1

i have a problem with Nuxt SSR mode in production auth with Laravel sanctum

login success but when refresh any page, redirecting to login page and logout !!!

Keyvan Gholami
  • 168
  • 1
  • 3
  • 15
  • You might want to check middleware or layout of a page to see if there is a logic to redirect. – HumbleCoder Dec 29 '21 at 04:09
  • Does this answer your question? [Vuex state on page refresh](https://stackoverflow.com/questions/43027499/vuex-state-on-page-refresh) – Jimmar Jan 08 '22 at 00:44

1 Answers1

0

The problem was solved by adding the following code:

headers: { Referer: baseURL, }

in auth strategy > endpoints > user

Keyvan Gholami
  • 168
  • 1
  • 3
  • 15
  • Hello. I'm trying to solve the same issue. Can you be more explicte where should I put this code? (I'm new to Nuxt, actually I have done the laravel dev and now helping the frontend team) – benjamin.donze Jul 11 '22 at 09:24