Skip to content

Expired token after sometimes? #304

Closed Answered by manchenkoff
rabeeaali asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @rabeeaali. Yes, you're right, when you use token mode it is indeed saved in your browser just for one session due to security reasons. Although token mode is widely used, it is not recommended for SPA apps unlike mobile apps and microservices.

Moreover, cookie storage for tokens was implemented just as a default option, which is not configurable via sanctum in your nuxt.config.ts. If you want to change the way it is stored or increase a lifetime, you should implement your own storage as described here - Nuxt Auth Sanctum - Token Storage

Replies: 1 comment 1 reply

Comment options

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

Answer selected by manchenkoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants