Users are not redirected to Log In Widget when returning to page after a token timeout

For our enterprise application, since we always want the user to log in, we put an Angular RouteGuard on the home route. Recently we have been having a lot of issues with the application hanging at a blank screen. Looking at the DevTools we noticed the same behavior described here: issue-17586: “The client specified not to prompt, but the user is not logged in” which, as the comments there suggest, it’s by design, but our users are still stuck on a blank screen.

If the user hits F5 a few times, they are often then forwarded to the widget. There are no other errors in DevTools in neither console nor network tabs.


"@okta/okta-angular": "^4.1.0",
"@okta/okta-auth-js": "^5.6.0",

Angular Router:

  { path: '', redirectTo: 'home', pathMatch: 'full' },
  { path: 'implicit/callback', component: OktaCallbackComponent },
  { path: 'home', canActivate: [OktaAuthGuard], loadChildren: () => import('../../components/my-forms/my-forms.module').then(m => m.MyFormsModule)},

Could there be an issue with the redirect? lazy loading? does the order of module loading matter? We placed the okta libraries in ‘auth.module’ which is exported to a ‘core.module’ then import that into ‘app.module’?

This is hard to figure out as it happens sporadically and mostly in production.