When loading the dashboard, instead of being redirected to the login form, it shows cached data, and a "Sign out" button.
Updated desc:
A stale window can stay "logged in" without a refresh and user wouldn't know.
Hitting Cognito's /oauth2/userInfo endpoint at an interval like ~60sec and if response.status === 401 redirect to /. At that point we can display a "Your session has expired. Please log in" 'modal' box (not a modal but the alert box I forget the name of).
Acceptance criteria
The dashboard should regularly poll if session is still valid, if expired then redirect user to root (the login form).
ToDo
- Detect expired credentials and redirect.
