In SvelteKit I use App.Locals to store the information of the user in the given session. This is - in SvelteKit - the recommended way, what is the recommended way of doing such a thing in Nuxt? I want to know this mechanism so that I can implement proper session management in combination with useCookie/setCookie and storageLayer. this way, on every request in the handler I can use this data.
#SvelteKit App.Locals alternative in Nuxt 3
5 messages · Page 1 of 1 (latest)
Can you give me a link to svelte kit docs? I'm curious how App.Locals works
Isn't that just server context? I think you can make a server middleware and extend the request data there
maybe this is what your're looking for https://nuxt.com/docs/guide/directory-structure/server#server-middleware