How does useSession work from vinxi?
I am not sure if it's documented anywhere how does it actually work, my questions
- does it set cookies?
- what is the secret passed to the config for
- is it jwt?
3 Replies
It’s an encrypted cookie you can put state in and trust the value of on the server
It‘s re-exported from unjs h3 package. Vinci just adds something to it.
https://h3.unjs.io/examples/handle-session
Handle Session - h3
Remember your users using a session.
Thanks this is really useful