oidc-client-ts
oidc-client-ts copied to clipboard
`activeNavigator` does not reset when clicking browser back button
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?