SignInCallbacks class
Callbacks for sign-in request lifecycle.
Use these callbacks to execute code at specific points during the sign-in process, such as showing loading states or handling navigation.
Example:
authClient.signIn.email(
email: email,
password: password,
callbacks: SignInCallbacks(
onRequest: () => setState(() => _isLoading = true),
onSuccess: (session) => navigateToHome(session),
onError: (error) => showError(error.message),
),
);
Constructors
- SignInCallbacks({void onRequest()?, void onSuccess(Session session)?, void onError(AuthError error)?})
- Creates a new SignInCallbacks instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onError → void Function(AuthError error)?
-
Called when sign-in fails.
final
- onRequest → void Function()?
-
Called when the sign-in request starts.
final
- onSuccess → void Function(Session session)?
-
Called on successful sign-in.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited