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

Commit ddf6753

Browse files
committed
only use slo after revoke on android devicesé
1 parent 3ec983d commit ddf6753

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/models/CryptrProvider.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
refreshBody,
2929
tokensBody,
3030
} from '../utils/helpers';
31-
import { DeviceEventEmitter } from 'react-native';
31+
import { DeviceEventEmitter, Platform } from 'react-native';
3232

3333
const CryptrProvider: React.FC<ProviderProps> = ({
3434
children,
@@ -166,16 +166,18 @@ const CryptrProvider: React.FC<ProviderProps> = ({
166166
setUnAuthenticated();
167167
if (slo_code) {
168168
let sloUrl = sloAfterRevokeTokenUrl(config, slo_code);
169-
Cryptr.startSecuredView(
170-
sloUrl,
171-
(_data: any) => {
172-
callback && callback(json);
173-
},
174-
(error: any) => {
175-
setError(error);
176-
errorCallback && errorCallback(error);
177-
}
178-
);
169+
if (Platform.OS === 'android') {
170+
Cryptr.startSecuredView(
171+
sloUrl,
172+
(_data: any) => {
173+
callback && callback(json);
174+
},
175+
(error: any) => {
176+
setError(error);
177+
errorCallback && errorCallback(error);
178+
}
179+
);
180+
}
179181
} else {
180182
if (callback) callback(json);
181183
}

0 commit comments

Comments
 (0)