AuthService class
Core authentication service
Handles all Firebase Auth operations including sign-in, linking, and sign-out.
Constructors
- AuthService({required LayouAuthConfig config, FirebaseAuth? firebaseAuth, GoogleSignIn? googleSignIn})
Properties
- currentUser → AuthUser?
-
Get current user synchronously
no setter
- currentUserId → String?
-
Get current user UID
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnonymous → bool
-
Check if current user is anonymous
no setter
-
linkedProviders
→ List<
String> -
Get list of linked provider IDs
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authStateChanges(
) → Stream< AuthUser?> - Stream of auth state changes
-
deleteUser(
{Future< void> onBeforeDelete()?, Future<void> onAfterDelete()?}) → Future<AuthResult< void> > - Delete current user
-
linkWithApple(
) → Future< AuthResult< AuthUser> > - Link current anonymous account with Apple
-
linkWithEmail(
{required String email, required String password}) → Future< AuthResult< AuthUser> > - Link current anonymous account with email and password
-
linkWithGoogle(
) → Future< AuthResult< AuthUser> > - Link current anonymous account with Google
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reauthenticateWithApple(
) → Future< AuthResult< void> > - Reauthenticate with Apple
-
reauthenticateWithEmail(
{required String email, required String password}) → Future< AuthResult< void> > - Reauthenticate with email and password
-
reauthenticateWithGoogle(
) → Future< AuthResult< void> > - Reauthenticate with Google
-
signInAnonymously(
) → Future< AuthResult< AuthUser> > - Sign in anonymously
-
signInWithApple(
) → Future< AuthResult< AuthUser> > - Sign in with Apple
-
signInWithEmail(
{required String email, required String password}) → Future< AuthResult< AuthUser> > - Sign in with email and password
-
signInWithGoogle(
) → Future< AuthResult< AuthUser> > - Sign in with Google
-
signOut(
{Future< void> onBeforeLogout()?, Future<void> onAfterLogout()?}) → Future<AuthResult< void> > - Sign out current user
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited