AuthDataService class

This class provides data services for authentication.

Constructors

AuthDataService(FirebaseAuth _auth, FirebaseFunctions _functions, [GoogleSignIn? googleSignIn])
Constructor for AuthDataService.

Properties

currentUser → User?
Returns the currently authenticated user.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isWeb ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

authIdTokenChanges() → Stream<User?>
Returns a stream of the current user's authentication state.
authStateChanges() → Stream<User?>
Returns a stream of the current user's authentication state.
createUserWithEmailAndPassword({required String email, required String password, String? displayName}) → Future<UserCredential>
Creates a new user with the provided email, password, and optional display name, and returns the user credential.
deleteCurrentUser() → Future<void>
fetchSignInMethodsForEmail(String email) → Future<List<String>>
Fetches the sign-in methods available for the provided email.
generateNonce([int length = 32]) → String
linkEmailAndPassword({required String email, required String password}) → Future<UserCredential>
Links an email/password credential to the current user.
logout() → Future<void>
Logs out the currently authenticated user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshCurrentUserToken({bool force = false}) → Future<IdTokenResult?>
reloadCurrentUser() → Future<User>
resendEmailVerification(String email) → Future<void>
Resends the email verification for the provided email.
sendPasswordResetEmail(String email) → Future<void>
Sends a password reset email to the provided email.
sha256ofString(String input) → String
Returns the sha256 hash of input in hex notation.
signInAnonymously() → Future<UserCredential>
Signs in the user anonymously and returns the user credential.
signInWithApple() → Future<UserCredential>
Signs in the user using Apple authentication and returns the user credential.
signInWithEmailAndPassword(String email, String password) → Future<UserCredential>
Signs in the user with the provided email and password, and returns the user credential.
signInWithFacebook() → Future<UserCredential>
Signs in the user using Facebook authentication and returns the user credential.
signInWithGoogle() → Future<UserCredential>
Signs in the user using Google authentication and returns the user credential.
signInWithMicrosoft() → Future<UserCredential>
Signs in the user using Microsoft authentication and returns the user credential.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

provider ↔ Provider<AuthDataService>
Provider for the AuthDataService class.
getter/setter pair