amrnn90 / breeze-nuxt

An application / authentication starter kit frontend in Nuxt3 for Laravel Breeze.
MIT License
198 stars 33 forks source link

$larafetch does not work with the installed "axios": "^0.21.2", from @vercel in your program. #31

Closed mydidefix closed 7 months ago

mydidefix commented 8 months ago

$larafetch does not work with the installed "axios": "^0.21.2", from @vercel in your program. It brings the 419 error or the response dismatch token. According to research at Axios, I could not find the error in any other package.json file. One question, can I install axios version 1.5.1 and if so where should I install axios, in the breeze-nuxt? Is there a guide where this problem with your package has already been addressed and solved. I have been researching for a long time how could I solve the problem? I think everyone in the production environment should have this problem. More Infos to the error: https://github.com/axios/axios/issues/6047

Can I use 2 different top-level domains or do I have to work with subdomains? I use different https://frontend.com and https://backend.com domains. The cookie values that are generated do not match. I get a 419 error message in the browser.

I have noticed the following. After comparing the request csrf-cookie (both tokens) and the next request login compared the cookies in the request cookies are correct but in the response cookies the laravel_session are not the same.

So the problem is that laravel_session has lost the value of csrf-cookie (laravel_session) when calling the login page in response cookies. there is a different value in the laravel_session.

Thank you very much for your help.

Kind regards Dieter Deutsch