Skip to content

Commit f4cd1f8

Browse files
committed
Split on , and space for scopes
1 parent cb012c0 commit f4cd1f8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ios/OAuthManager/OAuth2Client.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ - (DCTOAuth2Account *) getAccount:(NSString *)providerName
8686
// Required
8787
NSURL *authorize_url = [cfg objectForKey:@"authorize_url"];
8888
NSString *scopeStr = [cfg valueForKey:@"scopes"];
89-
NSArray *scopes = [scopeStr componentsSeparatedByString:@","];
89+
// NSArray *scopes = [scopeStr componentsSeparatedByString:@","];
90+
91+
NSString *sep = @", ";
92+
NSCharacterSet *set = [NSCharacterSet characterSetWithCharactersInString:sep];
93+
NSArray *scopes = [scopeStr componentsSeparatedByCharactersInSet:set];
94+
9095
// Optional
9196

9297
NSURL *access_token_url = [cfg objectForKey:@"access_token_url"];

0 commit comments

Comments
 (0)