Skip to content

Commit

Permalink
fix: audience check
Browse files Browse the repository at this point in the history
  • Loading branch information
peterphanouvong committed Jul 11, 2024
1 parent 999dda6 commit 22d2e85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const config = {
clientID: KINDE_CLIENT_ID,
clientSecret: KINDE_CLIENT_SECRET,
postLogoutRedirectURL: KINDE_POST_LOGOUT_REDIRECT_URL,
audience: KINDE_AUDIENCE,
audience: KINDE_AUDIENCE ? KINDE_AUDIENCE.split(' ') : '',
cookieDomain: KINDE_COOKIE_DOMAIN,
responseType: 'code',
codeChallengeMethod: 'S256',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/pageRouter/isTokenValid.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const isTokenValid = (token) => {
if (config.audience)
isAudienceValid =
accessTokenPayload.aud &&
accessTokenPayload.aud.includes(config.audience);
accessTokenPayload.aud.includes(...config.audience);

if (
accessTokenPayload.iss == config.issuerURL &&
Expand Down

0 comments on commit 22d2e85

Please sign in to comment.