I have an ionic-angled design with server developed in nodejs. I'm trying to do a user authentication by sending a request to google api through the Passport framework using Google-Strategy .
When you make the request, the following error occurs:
"Failed to load https://accounts.google.com/o/oauth2/v2/auth?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fuser%2Fgoogle%2Fredirect&scope=profile&client_id=976813214537-0a1kl69viqpgg5ibtcgt743secpsmrld.apps.googleusercontent.com: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 405"
On my server, I am already granting permission to all request sources. So I can not understand why I'm having this problem.
The problem seems to be that I'm using the browser to test the application with the ionic serve
command. I have already added an extension to the chrome that grants permission to the sources, but it did not solve my problem.