AKAuthenticationError Code=-7001 "(null)" when using ASAuthorizationPasswordRequest and ASAuthorizationAppleIDRequest

I am receiving this error in some cases when calling performRequests on an ASAuthorizationController.


Authorization failed: Error Domain=AKAuthenticationError Code=-7001 "(null)"



The full code is as follows


        ASAuthorizationAppleIDRequest *appleIdRequest = [[[ASAuthorizationAppleIDProvider alloc] init] createRequest];
        appleIdRequest.requestedScopes = @[ASAuthorizationScopeEmail, ASAuthorizationScopeFullName];
        ASAuthorizationPasswordRequest *passwordRequest = [[[ASAuthorizationPasswordProvider alloc] init] createRequest];
        ASAuthorizationController *controller = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[appleIdRequest, passwordRequest]];
        controller.delegate = self;
        controller.presentationContextProvider = self;
        [controller performRequests];


This happens consistently on the simulator, and inconsistently on device. I can't seem to find what's causing the issue.


Any help would be greatly appreciated.

Accepted Reply

This is an expected error when both password and appleid requests are passed and there are no valid password credentials

Replies

I have same issue.
Any help would be appreciated.

This is an expected error when both password and appleid requests are passed and there are no valid password credentials

Any suggestions for moving forward out of this? I'm using the "Juice" example and it had been working for about the past week-- and now it just stopped working with this error.

I too have the same issue, can't figure what to do.

For me it started working after going to Settings -> owners(your) account -> Password & Security -> Apple ID logins -> The app you are concerned with -> Stop using Apple ID.

This will work till you run it again from XCode, i.e. till you reinstall it. Then you got to do it again.

Post not yet marked as solved Up vote reply of HPFT Down vote reply of HPFT
Also having the same issue.