Possible to use update from useSession on unauthenticated users? #10899
Unanswered
william-will-angi
asked this question in
Help
Replies: 1 comment 1 reply
-
I am wanting to implement the same behaviour. @william-will-angi did you ever figure it out? I can't seem to find a way to get the user's authentication status without refreshing the page when you logged in another tab. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to get the
update
function returned byuseSession
to run for unauthenticated users? I'm trying to use some code similar to this, but it doesn't fetch the/api/auth/session
endpoint a second time the way I would expect.I also tried the following, more involved code, but this also did not update the internal session stored by next-auth client-side.
The use case is being able to refresh the user's authentication status without requiring a page reload. For example, if you logged in with another window/tab.
Beta Was this translation helpful? Give feedback.
All reactions