Skip to content

Commit

Permalink
🩹 Hotfix / Support old Token v2 (#21)
Browse files Browse the repository at this point in the history
* 🩹 Hotfix / Support old Token v2
  • Loading branch information
tuxtux59 authored Jul 4, 2024
1 parent 416fe1c commit 914be2d
Show file tree
Hide file tree
Showing 4 changed files with 12,672 additions and 7,577 deletions.
1 change: 1 addition & 0 deletions example/src/components/HorizontalDivider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import React from 'react';
import { StyleSheet, View } from 'react-native';

Expand Down
1 change: 1 addition & 0 deletions example/src/components/LoadingView.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import React from 'react';
import { ActivityIndicator, Text, View } from 'react-native';
import { styles } from '../styles';
Expand Down
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 914be2d

Please sign in to comment.