blueprint_auth library
Classes
- AuthController
- Central auth controller. Handles both AuthMethod.phone and AuthMethod.email.
- AuthControllerProvider
- Central auth controller. Handles both AuthMethod.phone and AuthMethod.email.
- AuthService
- Handles all shared /auth/* and /users/* API calls.
- AuthSession
- A user's active device session from GET /auth/sessions.
- AuthState
- Immutable snapshot of the current auth session.
- AuthStorage
- Persists the refresh token and user profile to secure storage.
- AuthTokens
- Access and refresh token pair returned by every auth endpoint.
- AuthUser
- Represents an authenticated user decoded from the JWT payload and/or fetched from GET /users/me.
- EmailAuthFlowController
- Manages the email auth flow (login and register steps). Delegates all API calls to authControllerProvider.
- EmailAuthFlowControllerProvider
- Manages the email auth flow (login and register steps). Delegates all API calls to authControllerProvider.
- EmailAuthFlowState
- EmailAuthService
- Handles all OTP-specific API calls for the phone auth flow.
- EmailLoginInput
- Input data for email login.
- EmailRegisterInput
- Input data for email registration.
- EmailRegisterRequest
- Request body for AuthMethod.email registration.
- ForgotPasswordFlowController
- Manages the 3-step forgot password flow:
- ForgotPasswordFlowControllerProvider
- Manages the 3-step forgot password flow:
- ForgotPasswordFlowState
- FxEmailAuth
- FxEmailAuthTheme
- FxForgotPasswordData
- Configuration for FxForgotPasswordWidget.
- FxForgotPasswordWidget
- Multi-step forgot password widget.
- FxOtpInput
- A 6-digit OTP input with a resend countdown.
- FxOtpInputState
- FxPhoneAuth
- FxPhoneAuthTheme
- LoginConfig
- Phone entry
- OtpData
- Data returned after a successful POST /auth/send-otp.
- OtpVerificationConfig
- Verify phone (OTP)
- PhoneAuthFlowController
- PhoneAuthFlowControllerProvider
- PhoneAuthFlowState
- PhoneAuthService
- Handles all OTP-specific API calls for the phone auth flow.
- PhoneEntryConfig
- Phone entry
- PhoneLookupResult
- Result of POST /auth/verify-otp. Branches based on whether the user already has an account.
- PhoneRegisterRequest
- Request body for AuthMethod.phone registration.
- RegisterConfig
- Register
- ResetPasswordInput
- Input data for the password reset step.
- UserDetailsConfig
- Enter user details
- UserDetailsInput
Enums
- AuthMethod
-
The authentication method the server is configured to use.
Set this once in
app/config/app_config.dart. - AuthStatus
- Status of the current authentication session.
- ForgotPasswordStep
- FxEmailAuthStep
- FxPhoneAuthStep
- Steps in the phone auth flow.
Extensions
- AuthSessionPatterns on AuthSession
- Adds pattern-matching-related methods to AuthSession.
- AuthStatePatterns on AuthState
- Adds pattern-matching-related methods to AuthState.
- AuthTokensPatterns on AuthTokens
- Adds pattern-matching-related methods to AuthTokens.
- AuthUserPatterns on AuthUser
- Adds pattern-matching-related methods to AuthUser.
- EmailAuthFlowStatePatterns on EmailAuthFlowState
- Adds pattern-matching-related methods to EmailAuthFlowState.
- EmailRegisterRequestPatterns on EmailRegisterRequest
- Adds pattern-matching-related methods to EmailRegisterRequest.
- ForgotPasswordFlowStatePatterns on ForgotPasswordFlowState
- Adds pattern-matching-related methods to ForgotPasswordFlowState.
- OtpDataPatterns on OtpData
- Adds pattern-matching-related methods to OtpData.
- PhoneAuthFlowStatePatterns on PhoneAuthFlowState
- Adds pattern-matching-related methods to PhoneAuthFlowState.
- PhoneLookupResultPatterns on PhoneLookupResult
- Adds pattern-matching-related methods to PhoneLookupResult.
- PhoneRegisterRequestPatterns on PhoneRegisterRequest
- Adds pattern-matching-related methods to PhoneRegisterRequest.
Properties
- authControllerProvider → AuthControllerProvider
-
Central auth controller. Handles both AuthMethod.phone and AuthMethod.email.
final
- emailAuthFlowControllerProvider → EmailAuthFlowControllerProvider
-
Manages the email auth flow (login and register steps).
Delegates all API calls to authControllerProvider.
final
- forgotPasswordFlowControllerProvider → ForgotPasswordFlowControllerProvider
-
Manages the 3-step forgot password flow:
final
- phoneAuthFlowControllerProvider → PhoneAuthFlowControllerProvider
-
final
Typedefs
-
OtpVerificationCallback
= Future<
void> Function(String otp) -
PhoneEntryCallback
= Future<
void> Function(String otp) -
UserDetailsCallback
= Future<
void> Function(UserDetailsInput input)