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

It does not autorenew token after 1 hour of inactivity #27

Open
kostia-lev opened this issue Jul 21, 2020 · 2 comments
Open

It does not autorenew token after 1 hour of inactivity #27

kostia-lev opened this issue Jul 21, 2020 · 2 comments

Comments

@kostia-lev
Copy link

  1. If I change time to something like 5 minutes till token expiration, it auto renews token

  2. if I leave page open for 1 hour or so, it silently passes expiration time and no token renew happens

@glossd
Copy link

glossd commented Aug 17, 2020

I solved that problem by invoking userManager.signinSilent() in the reducer on the USER_EXPIRED action.

In order to save user data between sessions I changed sessionStorage to localStorage by adding
userStore: new WebStorageStateStore({ store: localStorage}) to userManagerConfig

@MikeSuiter
Copy link

@glossd I've been trying to get silent renew to work and ran across your solution. I added the signinSilent() call when the user expires but something isn't working quite right. I have some questions:

  1. Do you have a silent_renew URI defined and how did you implement it?
  2. Do you use the signinSilent().then() method and what do you do in it?

Here is the console error I'm currently getting.

 [Error] Unhandled Promise Rejection: Error: Frame window timed out
	promiseEmptyOnRejected (1.chunk.js:310960)
	promiseReactionJob

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

3 participants