feat: Implement session management with SessionListener and SessionHandlerMixin

This commit is contained in:
Achintha Isuru
2026-02-17 14:03:24 -05:00
parent 506da5e26f
commit be40614274
8 changed files with 410 additions and 14 deletions

View File

@@ -21,20 +21,27 @@ import 'route_paths.dart';
///
/// See also:
/// * [ClientPaths] for route path constants
/// * [StaffNavigator] for Staff app navigation
/// * [ClientNavigator] for Client app navigation
extension ClientNavigator on IModularNavigator {
// ==========================================================================
// AUTHENTICATION FLOWS
// ==========================================================================
/// Navigate to the root authentication screen.
///
///
/// This effectively logs out the user by navigating to root.
/// Used when signing out or session expires.
void toClientRoot() {
navigate(ClientPaths.root);
}
/// Navigates to the get started page.
///
/// This is the landing page for unauthenticated users, offering login/signup options.
void toClientGetStartedPage() {
navigate(ClientPaths.getStarted);
}
/// Navigates to the client sign-in page.
///
/// This page allows existing clients to log in using email/password

View File

@@ -36,6 +36,13 @@ extension StaffNavigator on IModularNavigator {
navigate(StaffPaths.root);
}
/// Navigates to the get started page.
///
/// This is the landing page for unauthenticated users, offering login/signup options.
void toGetStartedPage() {
navigate(StaffPaths.getStarted);
}
/// Navigates to the phone verification page.
///
/// Used for both login and signup flows to verify phone numbers via OTP.