FusabaseAuth class
The entry point for accessing authentication features.
This class provides methods for signing in, signing out, and managing user sessions.
Constructors
- FusabaseAuth({required FusabaseApp app})
- Constructs an FusabaseAuth instance.
- FusabaseAuth.instanceFor({required FusabaseApp app})
-
Factory constructor to get an instance for a specific app.
factory
Properties
- app → FusabaseApp
-
The associated FUSABASE app instance.
final
- config ↔ dynamic
-
The configuration for authentication.
getter/setter pair
- currentUser → User?
-
Gets the current authenticated user.
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
- tenantId ↔ String?
-
The tenant ID.
getter/setter pair
Methods
-
authStateChanges(
) → Stream< User?> - Provides a stream of authentication state changes.
-
confirmPasswordReset(
{required String code, required String newPassword}) → Future< void> - Confirms password reset with a new password.
-
createUserWithEmailAndPassword(
{required String email, required String password}) → Future< UserCredential> - Creates a new user with the provided email and password.
-
getRedirectResult(
) → Future< UserCredential> - Gets the result of a redirect sign in.
-
idTokenChanges(
) → Stream< User?> - Provides a stream of ID token changes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendPasswordResetEmail(
{required String email}) → Future< void> - Sends a password reset email.
-
setPersistence(
Persistence persistence) → Future< bool> - Sets the persistence type for authentication state.
-
signInWithCredential(
AuthCredential credential) → Future< UserCredential> - Signs in using credentials.
-
signInWithEmailAndPassword(
{required String email, required String password}) → Future< UserCredential> - Signs in a user with email and password.
-
signInWithPopup(
dynamic provider) → Future< UserCredential> - Signs in using a popup window.
-
signInWithRedirect(
AuthProvider provider) → Future< void> - Initiates sign in with redirect.
-
signOut(
) → Future< void> - Signs out the current user.
-
toString(
) → String -
Returns a string representation of the auth instance.
override
-
userChanges(
) → Stream< User?> - Provides a stream of user changes.
-
verifyPasswordResetCode(
String code) → Future< String> - Verifies a password reset code.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → FusabaseAuth
-
Gets the default FusabaseAuth instance for the default app.
no setter