Skip to content

Commit 8cd3aaa

Browse files
author
Kadi Kraman
committed
Remove scope validation
1 parent f2c2011 commit 8cd3aaa

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { NativeModules, Platform } from 'react-native';
33

44
const { RNAppAuth } = NativeModules;
55

6-
const validateScopes = scopes =>
7-
invariant(scopes && scopes.length, 'Scope error: please add at least one scope');
86
const validateIssuerOrServiceConfigurationEndpoints = (issuer, serviceConfiguration) =>
97
invariant(
108
typeof issuer === 'string' ||
@@ -34,7 +32,6 @@ export const authorize = ({
3432
serviceConfiguration,
3533
dangerouslyAllowInsecureHttpRequests = false,
3634
}) => {
37-
validateScopes(scopes);
3835
validateIssuerOrServiceConfigurationEndpoints(issuer, serviceConfiguration);
3936
validateClientId(clientId);
4037
validateRedirectUrl(redirectUrl);
@@ -69,7 +66,6 @@ export const refresh = (
6966
},
7067
{ refreshToken }
7168
) => {
72-
validateScopes(scopes);
7369
validateIssuerOrServiceConfigurationEndpoints(issuer, serviceConfiguration);
7470
validateClientId(clientId);
7571
validateRedirectUrl(redirectUrl);

0 commit comments

Comments
 (0)