I've started project with Laravel and Nuxt3. But I can't use nuxt-auth-utils with sanctum. It doesn't work.
I try login, laravel return token then it processes another request - https://ecommerce.loc:3000/api/_auth/session and return {} and it dosen't authenticate.
const login = async () => {
await $fetch('https://ecommerce.loc/api/login', {
method: 'POST',
body: {
email: form.email,
password: form.password,
},
}).then(async (data) => {
fetch();
toast.add({
color: 'green',
title: 'User logged in successfully',
});
// router.push('/admin');
}).catch((err) => {
console.log(err)
toast.add({
color: 'red',
title: err.data?.message || err.message,
})
})
}
I tried to use documentation. But i don't find any information about using nuxt-auth-utils with sanctum.