FirebaseAuth class
The entry point of the Firebase Authentication SDK.
- Inheritance
-
- Object
- PlatformInterface
- FirebasePluginPlatform
- FirebaseAuth
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
- 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
- pluginConstants → Map
-
Returns any plugin constants this plugin app instance has initialized.
no setterinherited
- 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
-
authStateChanges(
) → Stream< User?> - Notifies about changes to the user's sign-in state (such as sign-in or sign-out).
-
idTokenChanges(
) → Stream< User?> - Notifies about changes to the user's sign-in state (such as sign-in or sign-out) and also token refresh events.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
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(
{required String email, required String password}) → Future< UserCredential> - Attempts to sign in a user with the given email address and password.
-
signOut(
) → Future< void> - Signs out the current user.
-
toString(
) → String -
A string representation of this object.
override
-
useAuthEmulator(
String host, int port) → Future< void> - Changes this instance to point to an Auth emulator running locally.
-
useEmulator(
String origin) → Future< void> - Changes this instance to point to an Auth emulator running locally.
-
userChanges(
) → Stream< User?> - Notifies about changes to any user updates.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → FirebaseAuth
-
Returns an instance using the default FirebaseApp.
no setter