Facebook Auth Error - node.js

it will be great if someone can help me with this and I have researched for countless hours on stack overflow already
This is my login page​​
When I click on the facebook button, it takes me to /auth/facebook​
Then after that, I get redirected to a
ECONNRESET: Request could not be proxied!
There was an error proxying the request error.
In the terminal, it says:
enter image description here
​
How do I fix this? PS.
Going off this tutorial
https://scotch.io/tutorials/easy-node-authentication-facebook​
Also Im using node.js, MongoDB, express.js, and facebook
Much thanks and have an amazing day

From the error that I'm seeing when trying to authenticate your app via Facebook, it seems as if your domain URL has not been properly added to Facebook's Developer API.
Are the proper URL's entered for your Facebook App Domains (in Basic Settings) and Valid OAuth redirect URIs (in Facebook Login Settings)?
Also, regarding that Node error that you're receiving, what is on line 60 of your Passport.js file?

Related

LINE login api authentication doesn't work after I've accepted the agreement

I'm developing a web app using node.js and use ejs as my view engine.
On my login page, I am trying to intergrate LINE login in my system.
I followed the instructions and tried run on the the login querystring in the following order,
access.line.me/dialog/oauth/weblogin?response_type=code&client_id={My Channel ID}&redirect_uri=https://localhost:3000/login&state=login
but the page shows "Can not connect to this site page." Tried refresh many times and it is still not working.
I've tried looking for the issue, but I still don't get why my login page is not showing up. Did I do anything wrong?
Thanks ahead
I think u cant use localhost url as your login url, it must be hosted and have https security

passport-facebook node app doesn't seen to work

https://www.facebook.com/dialog/oauth?response_type=code&redirect_uri=https%3A%2F%2Fpanorart-victor3991.c9users.io%2Fauth%2Ffacebook%2Fcallback&scope=emails&client_id=547453695448009
My app is still under development.
It used to work with facebook login. But it suddenly got to the 500 error with the text:
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
I thought this might be the facebook internal network error but the issue had been on for almost a month.
Does anyone have some idea why it's happening?
I'm also using google oauth with similar logic and it's working fine.
For me it was the scope passed via passport that was incorrect. I used the google scope which was profile and email, whereas facebook required publish_actions. Hope this helps

So how do properly setup a Redirect Uri?

A few days ago, I was playing around with a local API(not Google) and it required me to provide a Redirect Uri while trying to setup my app in their dashboard.
I did some googling and top searches led me to oAuth2.0 and Google Developer's website. But this API I'm using is not related with any of Google's so I thought it won't be relevant.
Is the setup of Redirect Uri for most APIs universal or almost the same? What programming languages can I use to implement this?
The description also says I need to parse a subscriber_number and access_token in JSON format. How do I do that?
Please note that I have already found a free hosting site via Firebase and have provided my own link. I also did the initial steps from another user to fire the required access_token that I needed to parse from the Redirect Uri. But accessing it from the browser right after triggering doesn't give me anything. I'm so clueless. Any help is much appreciated!

Why doesn't Nest API Oauth Redirect?

I've just begun playing around with the Nest API and am having trouble understanding why the OAuth2 server will not redirect a response to my redirecturi.
Example of my authentication attempt url:
https://home.nest.com/login/oauth2?client_id={ClientId}&redirect_uri=http://localhost&state=STATE
I'm able to authenticate and get a PIN back but ideally this is a response sent back to me and handled in my app dynamically.
Nevermind - I realized how can it possibly redirect to my localhost. Oops!
Thanks for the comment David - I found the redirectURI on my clients page now...must have overlooked that before.

Getting AccessTokenFailed using ServiceStack FacebookAuthProvider

trying to use facebook's oauth with servicestack, i'm hitting url
localhost:60782/api/auth/facebook
being taken to facebook's auth dialog but after clicking allow, i'm being redirected back to my redirect URL with #f=AccessTokenFailed
localhost:60782/api/users#f=AccessTokenFailed
anyone have any idea what's going on here?
I had a similar problem when setting the facebook authentication up. I found it difficult to pinpoint the problem because servicestack catches the web exception and effectively discards it. To work out what was happening I downloaded and compiled the service stack code. I was then able to change my project to reference my local service interace DLL which enabled me to set a debug point in the facebook auth provider.
In my case I was getting a proxy authentication error, caused by the server attempting to contact facebook without any credentials. I overcame this by reconfiguring my dev pc and production pc so that they didnt go via the proxy.

Resources