AuthenticationError
public enum AuthenticationError : Error
Errors that might arise during authentication.
-
The user did not enter the correct credentials.
Declaration
Swift
case authenticationFailed
-
The authentication context is invalid.
Declaration
Swift
case invalidContext
-
There is no passcode set for the device and therefore the authentication mechanism is not present. A custom authentication function could be offered, e.g., by storing a password by using
HashedPassword
.Declaration
Swift
case passcodeNotSet
-
The OS cancelled the authentication, e.g., because another app moved into the foreground. Displaying an error message in this case might not be neccessary, see if it can be handled like
.userCancel
.Declaration
Swift
case systemCancel
-
The user cancelled the authentication. Avoid displaying error messages in this case and try to handle this gracefully.
Declaration
Swift
case userCancel
-
The user was not able to authenticate via Touch ID or Face ID for three subsequent attempts.
Declaration
Swift
case tooManyFailedAttempts