I use AWS Cognito service for authentication. In my Angular 7 app, I use Amplify Auth to guard my pages.
If user navigates between different pages, Amplify will automatically handle the token refresh and they will not see token expirations.
If user stay in one page for long time, then the token will not be refreshed and eventually user will see expired token and will got 403 for web service call.
Any good solution to refresh access/id tokens if user stay in the same page for long time?