You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot update JWT after initial creation at login time, shown by a simplified example. In the current state, it seems that I am unable to implement token refresh as described in https://authjs.dev/guides/refresh-token-rotation.
How to reproduce
Login and watch the jwt() callback. As a sample I create an arbitrary property status and set it to "INITIAL" at the first invocation of jwt().
When jwt() is invoked for a second time, it returns a token with status: "REFRESH".
The new value is never persisted, at the third invocation of jwt(), status is still "INITIAL".
After every invocation of jwt() the returned token should be persisted.
The text was updated successfully, but these errors were encountered:
rhufsky
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Jan 1, 2025
Environment
Reproduction URL
https://github.com/rhufsky/authdemo
Describe the issue
Cannot update JWT after initial creation at login time, shown by a simplified example. In the current state, it seems that I am unable to implement token refresh as described in https://authjs.dev/guides/refresh-token-rotation.
How to reproduce
Login and watch the
jwt()
callback. As a sample I create an arbitrary propertystatus
and set it to"INITIAL"
at the first invocation ofjwt()
.When
jwt()
is invoked for a second time, it returns a token withstatus: "REFRESH"
.The new value is never persisted, at the third invocation of
jwt()
,status
is still"INITIAL"
.Expected behavior
After every invocation of
jwt()
the returned token should be persisted.The text was updated successfully, but these errors were encountered: