node-oauth-example
node-oauth-example copied to clipboard
CORS issue, unable to fetch user details
After successful authorization, it fails in welcome.html while trying to fetch user details using the user info API, due to CORS restrictions. I am receiving the following error. I tried using the cors module, but it didn't help. I am not sure how best to use it in this case.
Access to fetch at 'http://api.github.com/user' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
I think you have to use https instead of http.