Skip to content

Commit 3719019

Browse files
committed
fix(browser): 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 c0ecd03 commit 3719019

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/browser/src/__legacy__/utils/crypto-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class SPACryptoUtils implements Crypto<Buffer | string> {
5757
): Promise<boolean> {
5858
const jwtVerifyOptions = {
5959
algorithms: algorithms,
60-
audience: clientId,
60+
audience: [clientId],
6161
clockTolerance: clockTolerance,
6262
subject: subject,
6363
};

0 commit comments

Comments
 (0)