V
V
Vladimir2017-04-21 17:15:57
JavaScript
Vladimir, 2017-04-21 17:15:57

Why does authorization via passport.js only work on the local machine?

Good afternoon, I made authorization using passport.js through GOOGLE, FACEBOOK, TWITTER services.
When I authorize from my local machine, then authorization works through all services, if I try from another device, then no, only local authorization works. The following error is thrown:

Webpage not available
The webpage at http://localhost:3000/auth/google/callback?code=4/aSnGBSrQQrpVumhJ6Ar5FPqjQPZDD_V4Hr5id1DCHpg# could not be loaded because:
net::ERR_CONNECTION_REFUSED
Tell me how can I fix this? I can post the code if needed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Luzanov, 2017-04-21
@dmitry_luzanov

In the error "localhost:3000" when trying to authorize from another device? And nothing bothers you?

O
Oleg, 2017-04-21
@politon

Because node.js is the only one you have.

M
Mikhail Osher, 2017-04-21
@miraage

I bet that you need to write allowed redirect url / callback urls for each service, not only on the localhost, but also on the production server. And, usually, separate oauth credentials are created for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question