Skip to content

Commit

Permalink
Stupid JS not supporting array comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacksmoke16 committed Sep 22, 2023
1 parent 1dafc92 commit 75174cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script/src/esi_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ESIClient {
const clientId: string = getScriptProperties_().getProperty('CLIENT_ID')!;

if (jwtToken.iss !== ESIClient.ISSUER) throw 'Access token validation error: invalid issuer';
if (jwtToken.aud !== [clientId, ESIClient.AUDIENCE]) throw 'Access token validation error: invalid audience';
if (jwtToken.aud[0] !== clientId || jwtToken.aud[1] !== ESIClient.AUDIENCE) throw 'Access token validation error: invalid audience';
if (jwtToken.azp !== clientId) throw 'Access token validation error: invalid authorized party';
return jwtToken;
}
Expand Down

0 comments on commit 75174cc

Please sign in to comment.