Skip to content
Discussion options

You must be logged in to vote

The token is saved as a JWT by default, signed but not encrypted in an HTTPOnly secure cookie, which can only be read server-side. If you take that cookie though and paste it into https://jwt.io/ for example, you will be able to see the content pretty easily.

JWTs are meant to be self-contained, meaning once issued, they don't need communication with any server to be valid. They come with an expiry date, after which the server shouldn't accept them anymore. Some services can also revoke tokens, by maintaining a list of the revoked tokens until they expire, but this adds extra processing time. next-auth lets you encrypt that JWT optionally https://next-auth.js.org/configuration/options#jso…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@rishimohan
Comment options

Answer selected by rishimohan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants