AuthContextExtension extension

Extension for accessing auth state from any component

on

Properties

authState → dynamic

Available on BuildContext, provided by the AuthContextExtension extension

Get the current auth state
no setter
currentUser → dynamic

Available on BuildContext, provided by the AuthContextExtension extension

Get the current authenticated user
no setter
idToken String?

Available on BuildContext, provided by the AuthContextExtension extension

Get the current user's ID token for API calls
no setter
isAuthenticated bool

Available on BuildContext, provided by the AuthContextExtension extension

Whether the user is authenticated
no setter
isAuthLoading bool

Available on BuildContext, provided by the AuthContextExtension extension

Whether auth is loading
no setter
uid String?

Available on BuildContext, provided by the AuthContextExtension extension

Get the current user's UID
no setter

Methods

deleteAccount() Future<bool>

Available on BuildContext, provided by the AuthContextExtension extension

Delete account and all associated data
refreshAuthToken() Future<String?>

Available on BuildContext, provided by the AuthContextExtension extension

Refresh the ID token
registerWithEmail(String email, String password, String displayName) Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Register with email and password
sendPasswordResetEmail(String email) Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Send password reset email
signInWithApple() Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Sign in with Apple
signInWithEmail(String email, String password) Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Sign in with email and password
signInWithGitHub() Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Sign in with GitHub
signInWithGoogle() Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Sign in with Google
signOut() Future<void>

Available on BuildContext, provided by the AuthContextExtension extension

Sign out