Level 1
I didnt had the EnsureFrontendRequestsAreStateful on the kernel.
1 like
Hello Laravelers,
Today I just want to try the fortify as a SPA with Vue and I have the 401 unauthorized error. All I need a user to login and logout for now. I follow all the steps on the docs and I check the internet for solutions but I was unlikely. My vue is inside the laravel on the same domain. In fortify configs i turn off the views. I change the App url to the project url laravel.test. Then follow the docs and some examples to build the app.
Problem: Login successfully but when called the /api/user then return 401
Questions:
SANCTUM_STATEFUL_DOMAINS on the sanctum configs?attemptUser or doesnt need?attemptUser().finally(() => {
const app = createApp(App)
app.use(router)
app.mount('#app')
}))
I didnt had the EnsureFrontendRequestsAreStateful on the kernel.
Please or to participate in this conversation.