Facebook auth using passport.js is not working - passport.js

I am working with node.js in the backend. I am using a passport-facebook and cookie-session for authentication. But the error is showing every time (please check the added pic). I have rechecked my code various times, with no error or problems with the development side. Is it the problem of Facebook itself? Or I have to do any update on the developer.facebook.com console?
This the passport.js file

Related

How to do facebook authentication in React Native with nodejs as backend?

I have following problem:
I have an App with React Native and I need authentication via Facebook.
I figured out how to do it with expo and the expo-facebook but my problem is, that I also need authentication in the backend, which is done with NodeJs.
What is the right approach to do it, when the backend also needs to be secure?
I looked thru the internet for ours and didn´t find any tutorial...
Thanks in advance!
Check Passportjs. It's an authentication middleware for Nodejs. Search for the relevant strategy. Should be fairly easy to implement.

Node js Login API with Passport js

I'm building an project witch having lots of API but I have login API too in this case I'm using passport local stratagy for it I followed this video Node.js With Passport Authentication | Full Project But now while making API I haven't rendering page I want to send json respose that will says that password wrong or user not found but in local stratagy has only success redirect and failure redirect don't ay option to send json reponse Please suggest me a secure technique to do that also I'm verifing email is verified or not and user banned or not.
Read this article https://medium.com/swlh/set-up-an-express-js-app-with-passport-js-and-mongodb-for-password-authentication-6ea05d95335c
It will cover from start to end of using passport.js login using local strategy.
Here is the repo of above code implementation
https://github.com/FBosler/fb-tutorial-social-login/tree/steps/3_backend_1

Redirect user to angular app after login with nodejs/express

I am trying to build an application in nodejs and angular 6, where the login is done with node and after successful authentication the user is redirected to an angular application. I have looked at many resources online but only seem to find examples of either angular apps with login screens (that call nodejs API endpoints to pass user credentials), or with nodejs using express and Passport. If anyone can point me in the right direction for an example of this I would be extremely greatful.
I had created a repo similar with what you're looking for.
Here's the link to the project: ngx-express-passport-setup
You can clone it & try testing it on your environment. Setup instruction is provided.
Provided with all the instructions on ReadMe.Md for someone who wants to use Passport via local, google+, facebook and twitter Step by Step.
This project uses Angular5, NodeJS and ExpressJS
Hope this will help/guide you with your problem if ever you'll decide on using PassportJS as your Authentication as it is quite actually a popular tool for NodeJS.

browserInApp issue with Google OAuth in quasar+feathers app

Scenario:
I’m building Spa end Android app with quasarjs.
The backend is a feathers-js server with the feathers-js-oauth plugin for authentication.
I am using an SQLite database to store users.
I set up Facebook and Google oauth2 login, and it works in Spa mode with simple hypertext link “/oauth/google” in quasar
https://docs.feathersjs.com/api/authentication/oauth2.html#client-usage
Usually, for OAuth Cordova, people use “browserinapp” plugin that opens a pop-up for oauth2 authentication to fetch the token.
The problem is that Google dropped support for browserInApp user agent as you can see here https://github.com/nraboy/ng-cordova-oauth/issues/283
Did anyone have the same issue? How to solve?
I see some people use firebase, but can I use it only for authentication? I would like to maintain my server app with user collection.
I have the same problem. Temporarily fix the problem in a non-optimal way
add a timeout of 2 seconds inside the signInWithRedirect () method and then get the result getRedirectResult ()
Only works in production mode
I opened a case at https://github.com/quasarframework/quasar-cli/issues/186

Facebook Auth Error

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?

Resources