Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs Passportjs Reactjs CORS issue #73

Open
noman-ih opened this issue Aug 20, 2019 · 1 comment
Open

Nodejs Passportjs Reactjs CORS issue #73

noman-ih opened this issue Aug 20, 2019 · 1 comment

Comments

@noman-ih
Copy link

noman-ih commented Aug 20, 2019

Dear All I am using github login for my react.js application with passport github2 strategy
My React.js app is running on port 3000
and the Node.js server is running on port 5000

This is error I am getting when I try to login with github, please see the screenshot

image

Access to XMLHttpRequest at 'https://github.com/login/oauth/authorize?response_type=code&redirect_uri=http%3A%2F%2FXX.XX.71.24%3A5000%2Fapi%2Fv1%2Fauth%2Fgithub%2Fcallback&scope=user%3Aemail&client_id=f34f1df531540449d402' (redirected from 'http://XX.XX.71.24:3000/api/v1/auth/github') from origin 'http://XX.XX.71.24:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

CORS is enabled on my server as other endpoints are working fine
Here is the CORS settings

image

this my github app setting

image

@Adri1985
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants