Describe the bug
signUpWithApple is not passing params to ASAuthorizationAppleIDRequest. According to docs, it can receive nonce and requestedScopes but they are ignored in the native side of the library.
Steps to Reproduce
- Call
signUpWithApple with a nonce string
- Receive an
idToken without such nonce
Expected behavior
idToken should include the nonce in the params to validate it server-side.
Actual behavior
idToken does not contain a nonce in the JWT
Code snippet
https://github.com/benjamineruvieru/react-native-credentials-manager/blob/main/ios/CredentialsManager.mm#L217
- (void)signUpWithApple:(JS::NativeCredentialsManager::AppleSignInParams &)params
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject {
dispatch_async(dispatch_get_main_queue(), ^{
self.currentResolve = resolve;
self.currentReject = reject;
ASAuthorizationAppleIDProvider *appleIDProvider = [[ASAuthorizationAppleIDProvider alloc] init];
ASAuthorizationAppleIDRequest *appleIDRequest = [appleIDProvider createRequest];
appleIDRequest.requestedScopes = @[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail];
ASAuthorizationController *authController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[appleIDRequest]];
authController.delegate = self;
authController.presentationContextProvider = self;
[authController performRequests];
});
}
Describe the bug
signUpWithAppleis not passing params toASAuthorizationAppleIDRequest. According to docs, it can receivenonceandrequestedScopesbut they are ignored in the native side of the library.Steps to Reproduce
signUpWithApplewith anoncestringidTokenwithout suchnonceExpected behavior
idTokenshould include thenoncein the params to validate it server-side.Actual behavior
idTokendoes not contain anoncein the JWTCode snippet
https://github.com/benjamineruvieru/react-native-credentials-manager/blob/main/ios/CredentialsManager.mm#L217