mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
add role to access token generation (#603)
This commit is contained in:
parent
8e71f18f4f
commit
6a2c3f99a9
@ -103,6 +103,7 @@ export async function generateAccessToken(options: {
|
||||
sub: options.userId,
|
||||
branchId: options.tenancy.branchId,
|
||||
refreshTokenId: options.refreshTokenId,
|
||||
role: 'authenticated',
|
||||
},
|
||||
expirationTime: getEnvVariable("STACK_ACCESS_TOKEN_EXPIRATION_TIME", "10min"),
|
||||
});
|
||||
|
||||
@ -191,6 +191,7 @@ export namespace Auth {
|
||||
"refreshTokenId": expect.any(String),
|
||||
"aud": expect.any(String),
|
||||
"sub": expect.any(String),
|
||||
"role": "authenticated",
|
||||
"branchId": "main",
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user