SIWA on iOS/Swift: Error: error calling ‘strategies.apple.exchangeCode’: ==>: aborted after 2001ms (timeout is 2000ms)

We’re using Auth0 in our native iOS app in Swift with Sign in with Apple, and we’re having problems getting through App Store Review. The reviewer is getting the following error:

Error: error calling ‘strategies.apple.exchangeCode’: ==>: aborted after 2001ms (timeout is 2000ms)

It’s raised here:

extension ViewController: ASAuthorizationControllerDelegate {

    func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {

        if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential {

            guard let authorizationCode = appleIDCredential.authorizationCode,
                let authCode = String(data: authorizationCode, encoding: .utf8) else {
                    return
            }
            
            guard let fullName = appleIDCredential.fullName else {
                return
            }

            Auth0
                .authentication()
                .login(appleAuthorizationCode: authCode, fullName: appleIDCredential.fullName, scope: "openid profile email offline_access")
                .start { result in
                    DispatchQueue.main.async {
                        switch result {
                        case .success(let credentials):
                            // ! what should happen
                            print("Auth0 Success: \(credentials)")
                            // ...
                        case .failure(let error):
                            // ? what actually happens, where error is as above
                            print("Unable to sign in with Apple: \(error). Please try again?")
                        }
                    }
                }
        }
    }
}

We’ve not been able to replicate it, tried on iOS 13.6 and 14.2, with new accounts and reusing existing ones. Tried rebooting phones, deleting user records etc. Also asked the reviewer to reset access for the app in Settings (Settings > Apple ID > Password & Security > Apps using Apple ID) and disable throttling as per this post but that did not help.

SDK version Auth0 1.30.0 from CocoaPods, as per this guide. We’re not using Lock.swift.

Any advice is much appreciated.

Anyone? @konrad.sopala

Let me dive into this and get back to you with any answers and questions that I may have!

1 Like

@letoosh @konrad.sopala Any progress regarding this issue? We’ve also encountered it and our app is stuck in App Store Review.