FirebaseAuthWeb class

The web delegate implementation for FirebaseAuth.

Inheritance
  • Object
  • PlatformInterface
  • FirebaseAuthWeb

Constructors

FirebaseAuthWeb({required FirebaseApp app})
The entry point for the FirebaseAuthWeb class.

Properties

app → FirebaseApp
Returns the FirebaseApp for the current instance.
no setterinherited
appInstance → FirebaseApp?
The FirebaseApp this instance was initialized with.
finalinherited
currentUser ↔ UserPlatform?
Returns the current User if they are currently signed-in, or null if not.
getter/setter pairinherited-setter
customAuthDomain String?
Set the current Auth instance's auth domain for apple and android platforms. The auth domain used to handle redirects from OAuth provides, for example "my-awesome-app.firebaseapp.com". By default, this is set to null and default auth domain is used.
getter/setter pairinherited
delegate → Auth
no setter
hashCode int
The hash code for this object.
no setterinherited
languageCode String
The current Auth instance's language code.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tenantId String?
The current Auth instance's tenant ID.
getter/setter pair

Methods

applyActionCode(String code) Future<void>
Applies a verification code sent to the user by email or other out-of-band mechanism.
authStateChanges() Stream<UserPlatform?>
Notifies about changes to the user's sign-in state (such as sign-in or sign-out).
checkActionCode(String code) Future<ActionCodeInfo>
Checks a verification code sent to the user by email or other out-of-band mechanism.
confirmPasswordReset(String code, String newPassword) Future<void>
Completes the password reset process, given a confirmation code and new password.
createUserWithEmailAndPassword(String email, String password) Future<UserCredentialPlatform>
Tries to create a new user account with the given email address and password.
delegateFor({required FirebaseApp app}) → FirebaseAuthPlatform
Enables delegates to create new instances of themselves if a none default FirebaseApp instance is required by the user.
fetchSignInMethodsForEmail(String email) Future<List<String>>
Returns a list of sign-in methods that can be used to sign in a given user (identified by its main email address).
getRedirectResult() Future<UserCredentialPlatform>
Returns a UserCredential from the redirect-based sign-in flow.
idTokenChanges() Stream<UserPlatform?>
Notifies about changes to the user's sign-in state (such as sign-in or sign-out) and also token refresh events.
Checks if an incoming link is a sign-in with email link.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revokeTokenWithAuthorizationCode(String authorizationCode) Future<void>
Apple only. Users signed in with Apple provider can revoke their token using an authorization code. Authorization code can be retrieved on the user credential i.e. userCredential.additionalUserInfo.authorizationCode
sendAuthChangesEvent(String appName, UserPlatform? userPlatform) → void
Sends a Stream event to a authStateChanges stream controller.
sendPasswordResetEmail(String email, [ActionCodeSettings? actionCodeSettings]) Future<void>
Triggers the Firebase Authentication backend to send a password-reset email to the given email address, which must correspond to an existing user of your app.
sendSignInLinkToEmail(String email, [ActionCodeSettings? actionCodeSettings]) Future<void>
Sends a sign in with email link to provided email address.
setInitialValues({PigeonUserDetails? currentUser, String? languageCode}) FirebaseAuthWeb
Sets any initial values on the instance.
setLanguageCode(String? languageCode) Future<void>
When set to null, the default Firebase Console language setting is applied.
setPersistence(Persistence persistence) Future<void>
Changes the current type of persistence on the current Auth instance for the currently saved Auth session and applies this type of persistence for future sign-in requests, including sign-in with redirect requests. This will return a promise that will resolve once the state finishes copying from one type of storage to the other. Calling a sign-in method after changing persistence will wait for that persistence change to complete before applying it on the new Auth state.
setSettings({bool? appVerificationDisabledForTesting, String? userAccessGroup, String? phoneNumber, String? smsCode, bool? forceRecaptchaFlow}) Future<void>
Updates the current instance with the provided settings.
signInAnonymously() Future<UserCredentialPlatform>
Asynchronously creates and becomes an anonymous user.
signInWithCredential(AuthCredential credential) Future<UserCredentialPlatform>
Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook login Access Token, a Google ID Token/Access Token pair, etc.) and returns additional identity provider data.
signInWithCustomToken(String token) Future<UserCredentialPlatform>
Tries to sign in a user with a given Custom Token token.
signInWithEmailAndPassword(String email, String password) Future<UserCredentialPlatform>
Attempts to sign in a user with the given email address and password.
Signs in using an email address and email sign-in link.
signInWithPhoneNumber(String phoneNumber, RecaptchaVerifierFactoryPlatform applicationVerifier) Future<ConfirmationResultPlatform>
Starts a sign-in flow for a phone number.
signInWithPopup(AuthProvider provider) Future<UserCredentialPlatform>
Authenticates a Firebase client using a popup-based OAuth authentication flow.
signInWithProvider(AuthProvider provider) Future<UserCredentialPlatform>
Signs in with an AuthProvider using native authentication flow.
inherited
signInWithRedirect(AuthProvider provider) Future<void>
Authenticates a Firebase client using a full-page redirect flow.
signOut() Future<void>
Signs out the current user.
toString() String
A string representation of this object.
inherited
useAuthEmulator(String host, int port) Future<void>
Changes this instance to point to an Auth emulator running locally.
userChanges() Stream<UserPlatform?>
Notifies about changes to any user updates.
verifyPasswordResetCode(String code) Future<String>
Checks a password reset code sent to the user by email or other out-of-band mechanism.
verifyPhoneNumber({String? phoneNumber, PhoneMultiFactorInfo? multiFactorInfo, required PhoneVerificationCompleted verificationCompleted, required PhoneVerificationFailed verificationFailed, required PhoneCodeSent codeSent, required PhoneCodeAutoRetrievalTimeout codeAutoRetrievalTimeout, String? autoRetrievedSmsCodeForTesting, Duration timeout = const Duration(seconds: 30), int? forceResendingToken, MultiFactorSession? multiFactorSession}) Future<void>
Starts a phone number verification process for the given phone number.

Operators

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

Static Properties

instance FirebaseAuthWeb
Initializes a stub instance to allow the class to be registered.
no setter

Static Methods

registerWith(Registrar registrar) → void
Called by PluginRegistry to register this plugin for Flutter Web