Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredperreault-okta committed Jan 12, 2024
1 parent f8e9f69 commit fa9ceb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 7.5.1

### Bug Fix

- [#1482](https://github.com/okta/okta-auth-js/pull/1482) fix: idToken claim validation now accepts `aud` array
* Resolves [#1481](https://github.com/okta/okta-auth-js/pull/1481)

## 7.5.0

### Bug Fix
Expand Down
4 changes: 3 additions & 1 deletion lib/oidc/util/validateClaims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export function validateClaims(sdk: OktaAuthOAuthInterface, claims: UserClaims,
'does not match [' + iss + ']');
}

if (Array.isArray(claims.aud) && claims.aud.indexOf(aud) < 0 || !Array.isArray(claims.aud) && claims.aud !== aud) {
if ((Array.isArray(claims.aud) && claims.aud.indexOf(aud) < 0) ||
(!Array.isArray(claims.aud) && claims.aud !== aud))
{
throw new AuthSdkError('The audience [' + claims.aud + '] ' +
'does not match [' + aud + ']');
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "@okta/okta-auth-js",
"description": "The Okta Auth SDK",
"version": "7.5.0",
"version": "7.5.1",
"homepage": "https://github.com/okta/okta-auth-js",
"license": "Apache-2.0",
"main": "build/cjs/exports/default.js",
Expand Down

0 comments on commit fa9ceb8

Please sign in to comment.