How to distinguish the "no credential found" scenario from ASAuthorizationError

Hello everyone,

I'm developing a FIDO2 service using the AuthenticationServices framework. I've run into an issue when a user manually deletes a passkey from their password manager.

When this happens, the ASAuthorizationError I get doesn't clearly indicate that the passkey is missing. The error code is 1001, and the localizedDescription is "The operation couldn't be completed. No credentials available for login." The userInfo also contains "NSLocalizedFailureReason": "No credentials available for login."

My concern is that these localized strings will change depending on the user's device language, making it unreliable for me to programmatically check for a "no credentials" scenario.

Is there a more precise way to determine that the user has no passkey, without relying on localized string values?

Thank you for your help.

How to distinguish the "no credential found" scenario from ASAuthorizationError
 
 
Q