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

Passport.authentication() times out #259

Open
jandraor opened this issue May 27, 2019 · 3 comments
Open

Passport.authentication() times out #259

jandraor opened this issue May 27, 2019 · 3 comments

Comments

@jandraor
Copy link

I implemented a Facebook login strategy in an Express app using Oauth 2.0

It works fine on fast connections (Ethernet cable & 4G mobile) . However, in a slow connection (such as wi-fi) it keeps hanging after receiving the authorization code.

The server log shows GET /auth/facebook 302 & nothing else happens.

When it works, it fires the callback route "/auth/facebook/callback".

This is the url on the browser:

https://www.mywebsite.com/auth/facebook/callback?code=AQA7wUUnGkpsdFVs-PggQIbd809iOQ_B57oTSoKWmOe0JH9dsu4DI12IPP9Rr2jdVhSsWNexbhCy_Euy9pD0NGliY_zMEN3VPdRkiA4pnkeDLJyqWluuMxg4-khWagrKidgIK0GQW7-0MHkrCEyMvAnAucyNB5fnc2J2_byLSB6ELrfsBe-52jA4eLR6RFIshdLlO9qxTJmGH0JGU74a5zTNET9S52PaCUk6wEZD35Wl9zCLb5aaklOMiGm8JyW2KuoZnYkNYCEW6Yggr35eokXsMeJwqp_q2_qP4RQv82dhL47ZRX_da4MOPDPkyYTA4dc#=

It shows the error "Connection timed out".

I could trace where the flow gets stuck.

 router.get('/facebook', passport.authenticate('facebook', {
  scope : ['email']
}));

Please help.

@timorss
Copy link

timorss commented Jul 10, 2020

Same, Did you solve the issue?

@jandraor
Copy link
Author

I had a server centOS with Plesk pre-installed. Because I was only using the terminal, there were conflicts with Nginx. I had to reinstall centOS without Plesk, and everything worked fine. So, I suppose your problem could be with your web server.

@timorss
Copy link

timorss commented Jul 16, 2020

I upload the server to heroku, works fine.
Local host doesn't work

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