No in postman it is working fine but in nuxt app it is causing problems on register route or simply any post request. Btw i had found a workaround don't know if it is correct or not. Here it is.
this.$axios.get("sanctum/csrf-cookie").then(()=>{
// then after doing post request here it works.
})
Request failed with status code 419:
I got this error for login and register.
How to solve this?
I think it is because of csrf
I don't know how to do this.
for every post request I face with this error.
Are you facing the problem in postman? Did you write the register route properly?
No in postman it is working fine but in nuxt app it is causing problems on register route or simply any post request. Btw i had found a workaround don't know if it is correct or not. Here it is.
Ok didnt face such issues anyways thanks will note it for future reference
Request failed with status code 419:
I got this error for login and register.
How to solve this?
I think it is because of csrf
I don't know how to do this.
for every post request I face with this error.
Read the above comment the solution is provided there Thanks
You need to check the file config/sanctum.php, and see the index 'domains'... There you need to write the yours.