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

Context user is not being refresh when silentLogin() suceed #55

Open
pablovillacanas opened this issue Jun 2, 2022 · 0 comments
Open

Comments

@pablovillacanas
Copy link

The user on the UserData context that is used to determine whether the session has expired is not being updated since the didComponentMount() function of Authenticator.
That means, at least in my case, that when I silentLogin() with the userManager, it stores internally the new reference of the user, but the context and therefore, the Authenticator state, is not being updated. It leads to a malfunction when I refresh the page and the Authenticator reevaluated if user.isValid() as it is taking the Authenticator internal user state and not the userManager user one.

I have bypassed this behavior with some embarrassing bunch of things (one of them is hardcoded the userData.user value.

FYI:

  • The app is a SPA. makeAuthenticator util function is located as in the README.md.
  • The WrappedComponent is a FunctionalComponent that renders three p[possible pages depending on the user state.
  • We are using the same callback for renew and login without refresh token (not provided by backend)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant