PhoneAuthProvider class
An AuthProvider that allows to authenticate using a phone number.
- Inheritance
-
- Object
- AuthProvider<
PhoneAuthListener, PhoneAuthCredential> - PhoneAuthProvider
Constructors
Properties
- auth ↔ FirebaseAuth
-
The
FirebaseAuth
instance used to perform authentication against. By default,FirebaseAuth.instance
is used.getter/setter pairinherited - authListener ↔ PhoneAuthListener
-
An instance of the AuthListener that is used to notify about the
current state of the authentication process.
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- providerId → String
-
String identifer of the auth provider, for example:
'password'
,'phone'
or'google.com'
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldUpgradeAnonymous → bool
-
Indicates whether the user should be upgraded and new credential should be
linked.
no setterinherited
Methods
-
findProvidersForEmail(
String email, [AuthCredential? credential]) → void -
Fetches available providers for the given
email
.inherited -
linkWithCredential(
PhoneAuthCredential credential) → void -
Links a provided
AuthCredential
with the currently signed in user account.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCredentialReceived(
PhoneAuthCredential credential, AuthAction action) → void -
A method that is called when the user has successfully completed the
authentication process and decides what to do with the obtained
credential
.inherited -
sendVerificationCode(
{String? phoneNumber, AuthAction action = AuthAction.signIn, int? forceResendingToken, MultiFactorSession? multiFactorSession, PhoneMultiFactorInfo? hint}) → void -
Sends an SMS code to the
phoneNumber
. Ifaction
is AuthAction.link, an obtained auth credential will be linked with the currently signed in user account. Ifaction
is AuthAction.signIn, the user will be created (if doesn't exist) or signed in. -
signInWithCredential(
PhoneAuthCredential credential) → void -
Signs the user in with the provided
AuthCredential
.inherited -
supportsPlatform(
TargetPlatform platform) → bool -
Verifies that an AuthProvider is supported on a
platform
.override -
toString(
) → String -
A string representation of this object.
inherited
-
verifySMSCode(
{required AuthAction action, required String code, String? verificationId, ConfirmationResult? confirmationResult}) → void -
Verifies an SMS code using
verificationId
orconfirmationResult
(depending on what is currently available).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited