File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,11 +283,10 @@ - (void)addScopes:(NSArray<NSString *> *)scopes
283283 }
284284 return ;
285285 }
286-
287- // Use the union of granted and requested scopes.
288- [grantedScopes unionSet: requestedScopes];
289- options.scopes = [grantedScopes allObjects ];
290-
286+
287+ // Previously granted scopes will still be included since we pass `include_granted_scopes=true`.
288+ options.scopes = [requestedScopes allObjects ];
289+
291290 [self signInWithOptions: options];
292291}
293292
Original file line number Diff line number Diff line change @@ -764,8 +764,13 @@ - (void)testAddScopes {
764764 [parsedScopes removeObject: @" " ];
765765 grantedScopes = [parsedScopes copy ];
766766 }
767-
767+
768+ #if TARGET_OS_IOS || TARGET_OS_MACCATALYST
769+ NSArray <NSString *> *expectedScopes = @[kNewScope ];
770+ #elif TARGET_OS_OSX
768771 NSArray <NSString *> *expectedScopes = @[kNewScope , kGrantedScope ];
772+ #endif // TARGET_OS_OSX
773+
769774 XCTAssertEqualObjects (grantedScopes, expectedScopes);
770775
771776 [_user verify ];
You can’t perform that action at this time.
0 commit comments