SupabaseAuth class abstract
Handles all authentication operations with Supabase.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAuthenticated → bool
-
no setter
- phoneProvider → SupaAuthMobileAuthHelper
-
Access phone/OTP authentication methods.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uID → String?
-
no setter
- user → User?
-
no setter
Methods
-
createUser(
{required String email, required String password, String? emailRedirectTo, int? retryAttempt, Map< String, dynamic> ? metaData}) → Future<AuthResponse> -
Creates a new user with
emailandpassword.metaDatais saved inauth.users.raw_user_meta_data. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reAuthenticate(
{int? retryAttempt}) → Future< void> - re-authenticate the current user
-
refreshSession(
[int? retryAttempt]) → Future< AuthResponse> - refresh the current user's session
-
sendForgetPasswordEmail(
{required String email, String? redirect, int? retryAttempt}) → Future< void> -
Sends a password reset email to
email.redirectis the URL to redirect to after reset. -
setupAuthListener(
{required dynamic onSignedIn(String id), required dynamic onSignedOut(), required dynamic onUserUpdated(String id), dynamic onInitialSession()?, dynamic onTokenRefreshed()?}) → StreamSubscription< AuthState> - Sets up a listener for Supabase authentication state changes.
-
signInAnonymously(
{Map< String, dynamic> ? data, String? captchaToken, int? retryAttempt}) → Future<AuthResponse> -
Signs in a user anonymously.
datais saved inauth.users.raw_user_meta_data.captchaTokenis used for bot protection. -
signInWithEmailAndPassword(
{required String email, required String password, int? retryAttempt}) → Future< AuthResponse> -
Signs in a user with
emailandpassword. -
signInWithOAuth(
OAuthProvider provider, {String? redirectTo, String? scopes, LaunchMode launchMode = LaunchMode.platformDefault, Map< String, String> ? queryParams, int? retryAttempt}) → Future<bool> - Signs in a user using an OAuth provider (e.g. Google, GitHub, Apple).
-
signInWithSSO(
{String? providerId, String? domain, String? redirectTo, String? captchaToken, LaunchMode launchMode = LaunchMode.platformDefault, int? retryAttempt}) → Future< bool> - Signs in a user using SSO (Single Sign-On).
-
signOut(
{int? retryAttempt}) → Future< void> - sign out the current user
-
Signs in using a social media
provider(e.g. Google, Facebook).onSuccessreturns the raw data from the provider typed asT.Tcan be --AuthorizationCredentialAppleIDfor Apple,GoogleSignInAuthenticationfor Google,LoginResultfor Facebook -
toString(
) → String -
A string representation of this object.
inherited
-
updateUser(
{String? password, String? email, Object? data, int? retryAttempt}) → Future< void> -
Updates the current user's
email,password, ordata.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited