SupabaseAuth class abstract

Handles all authentication operations with Supabase.

Constructors

SupabaseAuth()

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 email and password. metaData is saved in auth.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. redirect is 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. data is saved in auth.users.raw_user_meta_data. captchaToken is used for bot protection.
signInWithEmailAndPassword({required String email, required String password, int? retryAttempt}) Future<AuthResponse>
Signs in a user with email and password.
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
socialMediaSignIn(SupaSocialMediaAuth provider, void onSuccess(SocialAuthResult)?, {int? retryAttempt}) Future<AuthResponse>
Signs in using a social media provider (e.g. Google, Facebook). onSuccess returns the raw data from the provider typed as T. T can be -- AuthorizationCredentialAppleID for Apple, GoogleSignInAuthentication for Google, LoginResult for 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, or data.

Operators

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