Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

🩹 Hotfix / Support old Token v2 #21

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading