feat(auth): gestion reAuthRequired + suppression flux changement mot de passe manuel

- AuthStatusResult: nouveau champ reAuthRequired (ancien compte nécessitant UPDATE_PASSWORD)
- AuthBloc._onLoginRequested: si reAuthRequired → logout silencieux + re-déclenchement AppAuth
  automatique (Keycloak affiche l'écran de changement de mot de passe dans Chrome Custom Tab)
- AuthBloc._onStatusChecked: si reAuthRequired → logout + AuthUnauthenticated (redirection login)
- Remplacement du flux premierLoginComplet (boolean) par enum côté backend
- Suppression de AuthPasswordChangeRequired, AuthPasswordChanging, change_password_page.dart
This commit is contained in:
dahoud
2026-04-05 11:13:36 +00:00
parent 5383df6dcb
commit 65b5c79c43
3 changed files with 96 additions and 35 deletions

View File

@@ -68,13 +68,13 @@ class AppRouter {
onboardingState: state.onboardingState,
organisationId: state.organisationId ?? '',
souscriptionId: state.souscriptionId,
typeOrganisation: state.typeOrganisation,
);
} else {
return const LoginPage();
}
},
),
'/dashboard': (context) => const MainNavigationLayout(),
'/login': (context) => const LoginPage(),
'/about': (context) => const AboutPage(),
'/help': (context) => const HelpSupportPage(),
@@ -85,10 +85,9 @@ class AppRouter {
'/solidarity': (context) => const DemandesAidePageWrapper(),
'/reports': (context) => const ReportsPageWrapper(),
'/finances': (context) => const CotisationsPageWrapper(),
'/my-finances': (context) => const CotisationsPageWrapper(),
'/moderation': (context) => const AdhesionsPageWrapper(),
'/communication': (context) => const ConversationsPage(),
'/org-settings': (context) => const SystemSettingsPage(),
'/adhesions': (context) => const AdhesionsPageWrapper(),
'/messages': (context) => const ConversationsPage(),
'/settings': (context) => const SystemSettingsPage(),
'/analytics': (context) {
final authState = context.read<AuthBloc>().state;
if (authState is AuthAuthenticated) {
@@ -102,12 +101,7 @@ class AppRouter {
}
return const LoginPage();
},
'/security': (context) => const SystemSettingsPage(),
'/system-admin': (context) => const MainNavigationLayout(),
'/global-users': (context) => const UserManagementPage(),
'/messages': (context) => const ConversationsPage(),
'/public-events': (context) => const EventsPageWrapper(),
'/contact': (context) => const HelpSupportPage(),
'/approvals': (context) => const PendingApprovalsPage(),
'/budgets': (context) => const BudgetsListPage(),
};