DEV Community

Discussion on: Secure authentication in Nuxt SPA with Laravel as back-end

Collapse
 
rzhevsky87 profile image
Rzhevsky87 • Edited

This is a very useful lesson. Thank you author. I am new to frontend. Sorry for the stupid question. I have an error with CORS :

Access to XMLHttpRequest at 'http://localhost:8080/api/register' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
Enter fullscreen mode Exit fullscreen mode

Can someone please explain in more detail what is the reason? And how is this solved?
... I using idea Ken Hall and this work for me. But i don't understand reason this problem.
And my refresh token expired on re-try to navigate to the page /secret =))

And there’s one more thing I don’t understand. For some reason, my navigation bar is not showing. What could be the reason?