Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activeNavigator does not reset when clicking browser back button #1298

Closed
schettn opened this issue Jul 1, 2024 · 2 comments
Closed

activeNavigator does not reset when clicking browser back button #1298

schettn opened this issue Jul 1, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@schettn
Copy link

schettn commented Jul 1, 2024

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?

@pamapa
Copy link
Member

pamapa commented Jul 9, 2024

This issue was made in the wrong repository i guess you meant https://github.com/authts/react-oidc-context

@pamapa pamapa transferred this issue from authts/oidc-client-ts Jul 9, 2024
@pamapa pamapa added the duplicate This issue or pull request already exists label Jul 9, 2024
@pamapa
Copy link
Member

pamapa commented Jul 9, 2024

see #1243

@pamapa pamapa closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants