NuxtN
Nuxt2y ago
7 replies
Eric

SSR and cookies

How do cookies work with SSR ?
1 - user tyes website.com in the browser
2 - the browser sends a cookie along
3 - the nuxt app receives the request and retreives the access_token from the cookie
4 - te nuxt app makes a request to the directus server
5 - the directus server sends back a response containing data and maybe a set-cookie rule
6 - the nuxt app renders the page and sends it to the browser with the set-cookie rule
7 - the browser shows the page and creates a new cookie

does that make sence ? I'm trying to figure out how to authenticate to directus in a nuxt app.
Was this page helpful?