AuthenticationException class

Thrown by authenticate when the user was not authenticated.

It is a PlatformException, so existing on PlatformException handlers keep working. The code is the one sent by the platform (authentication_error or unsupportedAuthenticationMethodErrorCode), the message is the platform's localized description, and reason tells what happened in the same way on every platform.

Inheritance

Constructors

AuthenticationException({required AuthenticationErrorReason reason, String code = authenticationErrorCode, String? message, dynamic details, String? stacktrace})
Creates an exception with the reason why the user was not authenticated.
AuthenticationException.fromPlatformException(PlatformException exception)
Creates an exception from the error reported by the platform.
factory

Properties

code String
An error code.
finalinherited
details → dynamic
Error details, possibly null.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isCanceled bool
Whether the prompt was dismissed, by the user, the system or the app.
no setter
message String?
A human-readable error message, possibly null.
finalinherited
reason AuthenticationErrorReason
The reason why the user was not authenticated.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stacktrace String?
Native stacktrace for the error, possibly null.
finalinherited

Methods

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

Operators

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

Constants

authenticationErrorCode → const String
The error code used by the platforms when the user was not authenticated.