DEV Community

Discussion on: Laravel Api authentication (Sanctum) with NuxtJs(Part-2)

Collapse
 
musawershah1598 profile image
Musawer Shah

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.
})
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
tanzimibthesam profile image
Tanzim Ibthesam

Ok didnt face such issues anyways thanks will note it for future reference