add role to access token generation (#603)

This commit is contained in:
Zai Shi 2025-04-09 05:06:40 +02:00 committed by GitHub
parent 8e71f18f4f
commit 6a2c3f99a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -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"),
});

View File

@ -191,6 +191,7 @@ export namespace Auth {
"refreshTokenId": expect.any(String),
"aud": expect.any(String),
"sub": expect.any(String),
"role": "authenticated",
"branchId": "main",
});
}