You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, i have problem when production mode.
after successful login, it's redirect to / and then when i refresh page it's not redirect to login but render the view login and then error page.
previous view like this:
after:
in development mode which is work fine and no errors. store/index.js
asyncnuxtServerInit({ commit },{ req }){letauth=nullconsole.log(req.headers.cookie)if(req.headers.cookie){// cookie foundtry{// check data user login with cookieconst{ data }=awaitthis.$axios.get('/user/me')// server return the data is cookie valid loggedIn is trueauth=data// set the data auth}catch(err){// No valid cookie foundauth=null}}console.log(auth)// return the user logged in objectthis.$auth.setUser(auth)},
hi, i have problem when production mode.
after successful login, it's redirect to
/
and then when i refresh page it's not redirect to login but render the view login and then error page.previous view like this:
after:
in development mode which is work fine and no errors.
store/index.js
login.vue
nuxt.config.js
there is something wrong?
Sorry my english is bad.
The text was updated successfully, but these errors were encountered: