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
Hi,
I am not sure whether this is a bug or not.
For jwt-based sessions we have the two callbacks jwt and session. As far as I know, the callback jwt is used to store data in a http-only cookie in the browser which cannot be accessed from javascript on the client. Therefore we have the session callback which is used to provide information to the client.
If we use the auth function on the server it returns the session. But shouldn't it instead return the jwt? Because the session is always a subset of the jwt. If that's intended, how can I access the jwt on the server?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am not sure whether this is a bug or not.
For jwt-based sessions we have the two callbacks
jwt
andsession
. As far as I know, the callbackjwt
is used to store data in a http-only cookie in the browser which cannot be accessed from javascript on the client. Therefore we have thesession
callback which is used to provide information to the client.If we use the
auth
function on the server it returns the session. But shouldn't it instead return the jwt? Because the session is always a subset of the jwt. If that's intended, how can I access the jwt on the server?Beta Was this translation helpful? Give feedback.
All reactions