Skip to content

Commit 75174cc

Browse files
committed
Stupid JS not supporting array comparisons
1 parent 1dafc92 commit 75174cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/script/src/esi_client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ESIClient {
3030
const clientId: string = getScriptProperties_().getProperty('CLIENT_ID')!;
3131

3232
if (jwtToken.iss !== ESIClient.ISSUER) throw 'Access token validation error: invalid issuer';
33-
if (jwtToken.aud !== [clientId, ESIClient.AUDIENCE]) throw 'Access token validation error: invalid audience';
33+
if (jwtToken.aud[0] !== clientId || jwtToken.aud[1] !== ESIClient.AUDIENCE) throw 'Access token validation error: invalid audience';
3434
if (jwtToken.azp !== clientId) throw 'Access token validation error: invalid authorized party';
3535
return jwtToken;
3636
}

0 commit comments

Comments
 (0)