laravelauthenticationnuxt.jslaravel-sanctumnuxt-auth

Redirected to login after refreshing page in nuxtjs and laravel sanctum


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 !!!


Solution

  • The problem was solved by adding the following code:

    headers: { Referer: baseURL, }

    in auth strategy > endpoints > user