-
Notifications
You must be signed in to change notification settings - Fork 255
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
Okta refresh token not working. Expired and renew events not triggering #1437
Comments
What version of Can you confirm you're only constructing a single |
I am only constructing one instance of oktaAuth. I was using the prepacked okta-js version in okta-react 7.0.0 but I have tried with the latest 7.3.1 too and it doesn't work |
@igloo12 Can you share more information about how you observe token expiration happen? You can use expireearlyseconds config to observe token expiration (DEV mode only). Internal Ref: OKTA-631863 |
@shuowu-okta It seems the issue is when the App is background. When I set the expireearlyseconds I see the token refresh as expected. But if I leave the app minimized and come back later the events don't fire and the token is expired |
We faced similar issue, since it seems that browser puts background/inactive tabs in a sleep mode after certain time. |
We are facing the similar issue, token auto renew is not happening when the user minimize the tab. Also the when user stays in same path its not getting renewed. is there any fix for this ? |
Describe the bug
I am trying to get the refresh token to trigger automatically. I am using okta-auth-js with the okta-react library. I am listening to the token events added, error, expired, renewed. The only event that fires is the added event.
Reproduction Steps?
Sign in and wait for the token to expire. No event is triggered
SDK Versions
System:
OS: macOS 13.4.1
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 719.52 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.2.0 - /usr/local/bin/node
npm: 9.6.6 - /usr/local/bin/npm
Browsers:
Chrome: 114.0.5735.198
Safari: 16.5.2
npmPackages:
@okta/okta-react: ^6.7.0 => 6.7.0
Additional Information?
No response
The text was updated successfully, but these errors were encountered: