Skip to content

Commit

Permalink
🩹 Hotfix / Support old Token v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtux59 committed Jul 4, 2024
1 parent 416fe1c commit 87935ad
Show file tree
Hide file tree
Showing 2 changed files with 12,670 additions and 7,577 deletions.
4 changes: 3 additions & 1 deletion src/utils/jwt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export const validatesAudience = (
config: PreparedCryptrConfig
): void | boolean => {
const expectedAudience =
jwtBody.jtt === 'openid' ? config.clientId : config.audience;
jwtBody.jtt === 'openid' && jwtBody.ver === 3
? config.clientId
: config.audience;
if (jwtBody.aud !== expectedAudience) {
throw new Error(
`Audience (aud) ${jwtBody.aud} claim is not compliant with ${expectedAudience} from config`
Expand Down
Loading

0 comments on commit 87935ad

Please sign in to comment.