exceptions library

Exceptions / Errors

AuthenticatorException
Used as a base exception for all authenticator exceptions thrown by this package.
ConditionalCreateNotEligibleException
Thrown by a conditional (automatic) create when the platform decides not to create a passkey, typically because the user did not just sign in with a saved password for this account. No UI was shown.
ConditionalCreateUnsupportedException
Thrown when a conditional (automatic) create is requested on a platform or OS version that does not support it (Windows, iOS/macOS below 18, a browser without conditional create, an Android credential provider without conditional create, or an Apple request that only allows a cross-platform authenticator).
CredentialNotAuthenticatedException
Thrown when none of the allowed credentials could be used to authenticate.
DeviceNotSupportedException
This exception is thrown when the device does not support passkeys. Suggestions:
DomainNotAssociatedException
Thrown when the relying party domain is not associated with the app.
ExcludeCredentialsCanNotBeRegisteredException
Thrown when the user tries to register but one of the excluded credentials matches an existing one on your local device.
MalformedBase64Url
This exception is thrown when a string is not a valid Base64URL encoded string.
MalformedBase64UrlChallenge
This exception is thrown when the user tries to login or register but the challenge is not a valid Base64URL encoded string.
MalformedBase64UrlCredentialID
This exception is thrown when the user tries to login or register but the credential ID is not a valid Base64URL encoded string.
MalformedBase64UrlUserID
This exception is thrown when the user tries to login or register but the user ID is not a valid Base64URL encoded string.
MissingGoogleSignInException
This exception is thrown when the user tries to login but is not logged in to a Google account on his device. Being logged in to a Google account is mandatory for passkeys to work on Android devices.
NoCreateOptionException
During the create credential flow, this is thrown when no viable creation options were found for the given CreateCredentialRequest. (no passkeys providers available or none enabled)
NoCredentialsAvailableException
This exception is thrown when the user tries to login but does not have any credentials available for the authenticator.
PasskeyAuthCancelledException
Thrown when the user cancels the passkey flow.
PasskeyUnsupportedException
This exception is thrown when passkey-related APIs are called on an unsupported Android version (API < 28).
PasswordCredentialUnsupportedException
Thrown when saved passwords are requested on a platform without a credential manager that returns them to the app (anything but Android).
RestoreCredentialUnsupportedException
This exception is thrown when the Android Restore Credentials APIs are called on a platform that does not have them: any platform other than Android, or an Android version below API 28.
SyncAccountNotAvailableException
This exception is thrown when the passkey can not be retrieved from the entity that is used for passkey syncing. Currently this error is observed when testing on Android emulators. In these cases you need to restart the emulator using the 'Cold Boot Now' option.
TimeoutException
This exception is thrown when the user tries to login or register but the operation times out.
UnhandledAuthenticatorException
This exception is thrown when an exception is thrown by the authenticator that we do not handle so far in this package.