Closed sylica closed 1 year ago
Why did you use "api" twice in your route?
I suggest you use baseurl in your auth strategies and if you are using separate domains for the backend and frontend or using Nuxt proxy check HTTP headers.
@sylica ه
Just removed the / from the end of the auth endpoints and it's working like a charm.
@keyvangholami it has /api/api bc the laravel backend is in the root directories api folder (the first api) and it uses the api routes (the second api)
Thanks!
Hi!
My problem is, that login/logout works perfectly on my localhost, but as soon as I deploy it on a server I got 301 and 405 errors, with the "The GET method is not supported for this route. Supported methods: POST" message and I cant figure it out why is that.
My nuxt.config.js:
My login method:
My Laravel api.php:
And i will attach my network tab from my browser (first is on localhost/working, second one is on a server/not working):
I don't know what I'm messing up but after several days of debugging I'm hopeless. I've emptied every possible caches on the backend side so I'm thinking thats not the problem. But hopefully somebody else will be much more clever than me and can tell me what's going on.
Thanks for reading it and helping! David