Closed luthfihizb closed 1 month ago
enableOnWindowFocus
is true by default. Maybe for your use case enabling period refresh will work.
sessionRefresh: {
enablePeriodically: 1000 * 10,
enableOnWindowFocus: true,
}
Maybe for your use case enabling period refresh will work
enabling period refresh only works if the tab is open.. meanwhile the issue still occurs if the token expires while the tab is closed
Hello 👋
Please provide a reproduction for this issue 🙏
This issue was closed because it was open for 14 days without a reproduction.
Environment
Reproduction
Here is my auth config
Describe the bug
Currently, I'm testing what happens when the access token expires by simulating a very short expiration time (10 seconds). If the access token expires while the tab is still open (but I switch to another tab), when I refocus the tab, the access token refreshes fine..
But if the tab is closed when the access token is expired, the refresh mechanism is somehow ignored, and the user is redirected to the login page even though the refresh token still exists in the cookies. Reloading the tab also does not trigger the refresh.
Is this behavior expected? What I expect is that refocusing existing tab, reloading the tab, or opening a new tab should have the same behavior, right?
Additional context
No response
Logs
No response