oidc-client-ts icon indicating copy to clipboard operation
oidc-client-ts copied to clipboard

`activeNavigator` does not reset when clicking browser back button

Open schettn opened this issue 1 year ago • 0 comments

I use the following to get the loading state during the auth.signInRedirect call.

const auth = useAuth()

const loadingText = useMemo(() => {
  switch (auth.activeNavigator) {
    case 'signinRedirect':
    case 'signinSilent':
      return 'Signing you in...'
    case 'signoutSilent':
    case 'signoutRedirect':
      return 'Signing you out...'
    case undefined:
      return undefined
    default:
      return 'Loading...'
  }
}, [auth.activeNavigator])

The problem is that when I press the browser back button the activeNavigator still is signinRedirect. Is this indented? How do I cope with that?

schettn avatar Jul 01 '24 14:07 schettn