2 Commits

Author SHA1 Message Date
05123e6c8f feat(auth): persist roles and support multi-role in ProtectedRoute
- Persist `roles` array in localStorage on login and session restore.
- Reconcile `userType` from roles returned by the `user-info` function.
- `ProtectedRoute` now accepts `requiredUserType?: UserType[]` and `requiredRoles?: string[]` and evaluates multi-role permission (OR semantics).
- Minor adjustments in `useAuth` and debug logs to ensure consistent `profile` and `roles` restoration.
- Main files changed: `hooks/useAuth.tsx`, `components/ProtectedRoute.tsx`, `types/auth.ts.
2025-10-13 02:18:49 -03:00
João Gustavo
a6ae27876e add-login-and-logout-endpoints 2025-09-28 04:10:40 -03:00