auth library
Classes
- AuthInterceptor
-
A Dio
Interceptorthat handles JWT-based authentication transparently. - OtpEntry
- A stored OTP entry with code, expiry, and attempt tracking.
- OtpService
- Generates and validates time-limited one-time passwords (OTPs) for email/SMS authentication flows.
- ProtectedRouteGuard
-
A
GoRouterredirect guard that protects routes from unauthenticated access. - SessionAuthenticated
- The user is authenticated.
- SessionLoading
- The session state is being restored from persisted storage.
- SessionManager
- Manages user authentication state across the application lifecycle.
- SessionState
- Represents the current authentication state of the application.
- SessionStateProvider
- Read-only interface that exposes the current SessionState.
- SessionUnauthenticated
- The user is not authenticated.
- TokenStore
- Secure, singleton storage for JWT access and refresh tokens.
- TokenStoreBase
- Abstract interface for token persistence.
Enums
- OtpValidationResult
- The outcome of an OtpService.validate call.
Typedefs
-
TokenRefreshCallback
= Future<
String?> Function(String refreshToken) -
A callback that receives the current refresh token and must return a fresh
access token on success, or
nullon failure.