Static GitHub Issues

[501] save state on server side

prev: Integration of vue-i18n
next: Vue router and vue2-vreadcrumbs

Hi guys, i like to save the auth state (token and user) on the server-side so that when i refresh the page i keep the user logged in?

i tried using nuxtServerInit() like that

image

but when i refresh on a url that have an auth middleware, i get a redirection to login page.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c440">#c440</a>)</em></sub></div>