Possible to use update from useSession on unauthenticated users? #10899
Unanswered
william-will-angi
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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