I am try to implement facebook auth system but when facebook sends back user data it gives me “This site can’t provide a secure connectionlocalhost sent an invalid response.” response.
Then I try to find out solution of that problem I found my server is run’s on localhost and it had no secure connection. my local machine run on “http” but facebook redirect me on “https” protocol url.
So I go to the my developer console I found my url had secure connection and I don’t know why? I was try to change that but I am fail to change that.
Here is my code:
passport.use(new FacebookStrategy({
clientID: cradentials.facebookSecrets.FACEBOOK_APP_ID,
clientSecret: cradentials.facebookSecrets.FACEBOOK_APP_SECRET,
callbackURL: "/auth/facebook/redirect"
},
function (accessToken, refreshToken, profile, cb) {
console.log(profile)
// User.findOrCreate({ facebookId: profile.id }, function (err, user) {
// return cb(err, user);
// });
}
));
How do I solve that problem to get my user profile information?