FirebaseAuth class
Pure Dart FirebaseAuth implementation.
Constructors
- FirebaseAuth.instanceFor({required FirebaseApp app})
-
Returns an instance using a specified
FirebaseApp
.factory
Properties
- app ↔ FirebaseApp
-
The
FirebaseApp
for this current Auth instance.getter/setter pair - client ← Client
-
Change the HTTP client for the purpose of testing.
no getter
- currentUser → User?
-
Returns the current User if they are currently signed-in, or
null
if not.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
Methods
-
authStateChanges(
) → Stream< User?> - Sends events when the users sign-in state changes.
-
confirmPasswordReset(
String? code, String? newPassword) → Future< String> - Completes the password reset process, given a confirmation code and new password.
-
createUserWithEmailAndPassword(
String email, String password) → Future< UserCredential> - Tries to create a new user account with the given email address and password.
-
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).
-
idTokenChanges(
) → Stream< User?> - Sends events for changes to the signed-in user's ID token, which includes sign-in, sign-out, and token refresh events.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendPasswordResetEmail(
{required String email, String? continueUrl}) → Future< String> - Sends a password reset email to the given email address.
-
setLanguageCode(
String? languageCode) → void - When set to null, the default Firebase Console language setting is applied.
-
signInAnonymously(
) → Future< UserCredential> - Asynchronously creates and becomes an anonymous user.
-
signInWithCredential(
AuthCredential credential) → Future< UserCredential> - 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< UserCredential> - Tries to sign in a user with a given custom token.
-
signInWithEmailAndPassword(
String email, String password) → Future< UserCredential> - Attempts to sign in a user with the given email address and password.
-
signInWithPhoneNumber(
String phoneNumber, [RecaptchaVerifier? verifier]) → Future< ConfirmationResult> - Starts a phone number verification process for the given phone number.
-
signInWithPopup(
) → Future< UserCredential> - Authenticates a Firebase client using a popup-based OAuth authentication flow.
-
signOut(
) → Future< void> - Signs out the current user.
-
toString(
) → String -
A string representation of this object.
inherited
-
useAuthEmulator(
{String host = 'localhost', int port = 9099}) → Future< Map> - Changes this instance to point to an Auth emulator running locally.
-
verifyPasswordResetCode(
String? code) → Future< String> - Checks a password reset code sent to the user by email or other out-of-band mechanism.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → FirebaseAuth
-
Returns an instance using the default
FirebaseApp
.no setter