You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to authenticate facbook login but dialogue is not apprearing to login or neither its redirecting to facebook login page its just keep on spinning and request time out.
I am trying to authenticate facbook login but dialogue is not apprearing to login or neither its redirecting to facebook login page its just keep on spinning and request time out.
//Strategy
const passport = require('passport')
, FacebookStrategy = require('passport-facebook').Strategy;
const strategy = new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: FACEBOOK_CALLBACK_URL,
enableProof: true
},
(accessToken, refreshToken, profile, done) => {
console.log(profile);
});
passport.use(strategy);
// my routes
router.get('/auth/facebook',fbController.facebookLogin);
router.get('auth/facebook/callback',fbController.fbRedirection);
// controller methods
const facebookLogin = async (req, res) => {
passport.authenticate('facebook')
}
const fbRedirection = async (req, res) => {
passport.authenticate('facebook', {failureRedirect: '/home'},
function (req, res) {
// Successful authentication, redirect home.
res.redirect('myRoute');
});
}
I installed localhost ssl certificates also and update the website url accordingly
I don`t no where is the mistake.
Please if someone can help me to get out of it
Thanks
The text was updated successfully, but these errors were encountered: