@@ -12,20 +12,21 @@ const validateClientId = clientId =>
12
12
const validateRedirectUrl = redirectUrl =>
13
13
invariant ( typeof redirectUrl === 'string' , 'Config error: redirectUrl must be a string' ) ;
14
14
15
- export const authorize = ( { issuer, redirectUrl, clientId, scopes, additionalParameters, dangerouslyAllowInsecureHttpRequests = false } ) => {
15
+ export const authorize = ( {
16
+ issuer,
17
+ redirectUrl,
18
+ clientId,
19
+ scopes,
20
+ additionalParameters,
21
+ dangerouslyAllowInsecureHttpRequests = false ,
22
+ } ) => {
16
23
validateScopes ( scopes ) ;
17
24
validateIssuer ( issuer ) ;
18
25
validateClientId ( clientId ) ;
19
26
validateRedirectUrl ( redirectUrl ) ;
20
27
// TODO: validateAdditionalParameters
21
28
22
- const nativeMethodArguments = [
23
- issuer ,
24
- redirectUrl ,
25
- clientId ,
26
- scopes ,
27
- additionalParameters
28
- ]
29
+ const nativeMethodArguments = [ issuer , redirectUrl , clientId , scopes , additionalParameters ] ;
29
30
if ( Platform . OS === 'android' ) {
30
31
nativeMethodArguments . push ( dangerouslyAllowInsecureHttpRequests ) ;
31
32
}
@@ -34,7 +35,14 @@ export const authorize = ({ issuer, redirectUrl, clientId, scopes, additionalPar
34
35
} ;
35
36
36
37
export const refresh = (
37
- { issuer, redirectUrl, clientId, scopes, additionalParameters, dangerouslyAllowInsecureHttpRequests = false } ,
38
+ {
39
+ issuer,
40
+ redirectUrl,
41
+ clientId,
42
+ scopes,
43
+ additionalParameters,
44
+ dangerouslyAllowInsecureHttpRequests = false ,
45
+ } ,
38
46
{ refreshToken }
39
47
) => {
40
48
validateScopes ( scopes ) ;
@@ -50,7 +58,7 @@ export const refresh = (
50
58
clientId ,
51
59
refreshToken ,
52
60
scopes ,
53
- additionalParameters
61
+ additionalParameters ,
54
62
] ;
55
63
56
64
if ( Platform . OS === 'android' ) {
0 commit comments