AuthService class
This file contains the implementation of the AuthService
class.
The AuthService
class provides authentication services using Firebase Auth.
It interacts with the AuthDataService
to perform authentication operations.
Constructors
- AuthService.new(AuthDataService _authDataService)
Properties
- currentUser → AuthUserVO?
-
Returns the currently authenticated user as an
AuthUserVO
object.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authIdTokenChanges(
) → Stream< AuthUserVO?> -
Returns a stream of
AuthUserVO
objects representing the authenticated user. -
authStateChanges(
) → Stream< AuthUserVO?> -
Returns a stream of
AuthUserVO
objects representing the authenticated user. -
createUserWithEmailAndPassword(
{required String email, required String password, String? displayName}) → Future< AuthUserCredentialVO> -
Creates a new user with the provided email and password, and returns an
AuthUserCredentialVO
object. -
deleteCurrentUser(
) → Future< void> -
fetchSignInMethodsForEmail(
String email) → Future< List< String> > - Fetches the sign-in methods available for the provided email.
-
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< AuthIDTokenResultVO?> -
reloadCurrentUser(
) → Future< AuthUserVO> -
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.
-
signInAnonymously(
) → Future< AuthUserCredentialVO> -
Signs in the user anonymously and returns an
AuthUserCredentialVO
object. -
signInWithApple(
) → Future< AuthUserCredentialVO> -
Signs in the user using Apple authentication and returns an
AuthUserCredentialVO
object. -
signInWithEmailAndPassword(
String email, String password) → Future< AuthUserCredentialVO> -
Signs in the user with the provided email and password, and returns an
AuthUserCredentialVO
object. -
signInWithFacebook(
) → Future< AuthUserCredentialVO> -
Signs in the user using Facebook authentication and returns an
AuthUserCredentialVO
object. -
signInWithGoogle(
) → Future< AuthUserCredentialVO> -
Signs in the user using Google authentication and returns an
AuthUserCredentialVO
object. -
signInWithMicrosoft(
) → Future< AuthUserCredentialVO> -
Signs in the user using Microsoft authentication and returns an
AuthUserCredentialVO
object. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
provider
↔ Provider<
AuthService> -
Provider for the
AuthService
class.getter/setter pair