[useSession] Calling update() does nothing when unauthenticated #10877
Labels
bug
Something isn't working
invalid reproduction
The issue did not have a detectable valid reproduction URL
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Environment
Reproduction URL
N/A
Describe the issue
When calling the
update
function returned byuseSession
it doesn't actually do anything when the user is unauthenticated.My expectation was that calling
update
should fire a request to/api/auth/session
which would then re-hydrate the session provider with the latest information, but that doesn't seem to be the case.How to reproduce
The following hook should reproduce the issue we're seeing:
The above code will only call the
/api/auth/session
endpoint a single time.Expected behavior
It's expected that the
/api/auth/session
endpoint would be called twice. The first time, behind the scenes byuseSession
to evaluate the session state and then a second time by the manual update tosession.update()
The text was updated successfully, but these errors were encountered: