AuthenticationMethod enum

The authenticators a user is allowed to use to prove their identity.

Pass one of these values to canAuthenticate and authenticate. Always use the same value for both calls, so the availability check matches the prompt that is shown to the user.

Not every platform supports every method. When a method is not supported, canAuthenticate returns false and authenticate fails with a PlatformException whose code is unsupportedAuthenticationMethodErrorCode.

Inheritance
Available extensions

Values

biometricsOnly → const AuthenticationMethod

Biometrics only (Face ID, Touch ID, fingerprint, face unlock, ...).

Supported on Android, iOS, macOS, Linux and Windows. This is the default.

biometricsOrDeviceCredential → const AuthenticationMethod

Biometrics, falling back to the device credential (PIN, pattern, passcode or password). Users without enrolled biometrics can still authenticate.

Supported on Android, iOS, macOS and Windows.

deviceCredentialOnly → const AuthenticationMethod

Device credential only (PIN, pattern, passcode or password).

Supported on Android 11 (API 30) or newer, iOS, macOS and Windows.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AuthenticationMethod>
A constant List of the values in this enum, in order of their declaration.