Skip to content

Commit 8969759

Browse files
committed
fix(javascript): support multiple audiences in ID token validation
Change audience parameter from string to array in jose.jwtVerify() to properly validate tokens with multiple audiences (e.g., Choreo tokens with ['client-id', 'choreo:deployment:sandbox']). This fixes validation failures that caused immediate logout after authentication."
1 parent 3719019 commit 8969759

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/javascript/src/DefaultCrypto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class DefaultCrypto implements Crypto<Uint8Array> {
6464

6565
await jose.jwtVerify(idToken, key, {
6666
algorithms,
67-
audience: clientId,
67+
audience: [clientId],
6868
clockTolerance,
6969
issuer: validateJwtIssuer ? issuer : undefined,
7070
subject,

0 commit comments

Comments
 (0)