How to tell the passkey error ASAuthorizationErrorCanceled is user canceled or No Credentials?

As the description in the demo, if there is no credentials, will receive the same error code (ASAuthorizationErrorCanceled) as if the user canceled. In this case, Is there a way to distinguish whether the error is canceled by the user or no credentials?


 if authorizationError.code == .canceled {

            // Either the system doesn't find any credentials and the request ends silently, or the user cancels the request.

            // This is a good time to show a traditional login form, or ask the user to create an account.

         

        } else {

            // Another ASAuthorization error.

            // Note: The userInfo dictionary contains useful information.

            logger.error("Error: \((error as NSError).userInfo)")

        }

}

There is intentionally no way to distinguish these two scenarios, as a user privacy feature to not reveal information about data on their device that they didn't consent to share. In both cases, the result is "the user has no credentials on their device that they wish to sign in with".

How to tell the passkey error ASAuthorizationErrorCanceled is user canceled or No Credentials?
 
 
Q