passport-facebook

how to handle passport-facebook callback in angular client?

一笑奈何 提交于 2019-12-21 04:16:08
问题 I am developing a MEAN application. I am using passport for authentication- local, facebook and google strategies. I am using angularjs client. All the routing is handled at client. I am only consuming server data apis. When using passport-facebook strategy, I am using below code at node server as per passport docs. app.get('/auth/facebook',passport.authenticate('facebook-auth', { scope : ['email'] })); app.get('/auth/facebook/callback',passport.authenticate('facebook-auth', { successRedirect

Why is passport.serializeUser executed on each request?

泄露秘密 提交于 2019-12-18 12:04:08
问题 I am using passport.js + passport-facebook-token to secure my API build with Strongloop's Loopback Framework. Why is passport serializing the deserialized user again after it has successfully been deserialized? Also the passport.authenticate method is called on every request! What am I doing wrong? Here is node's log: deserializeUser, id: XXXXXXXXXXXXXXXX User found. serializeUser, id: XXXXXXXXXXXXXXXX GET /api/events?access_token

Get request object in Passport strategy callback

我的梦境 提交于 2019-12-17 18:26:19
问题 So here is my configuration for passport-facebook strategy: passport.use(new FacebookStrategy({ clientID: ".....", clientSecret: ".....", callbackURL: "http://localhost:1337/register/facebook/callback", }, facebookVerificationHandler )); And here is facebookVerificationHandler: var facebookVerificationHandler = function (accessToken, refreshToken, profile, done) { process.nextTick(function () { ....... }); }; Is there a way to access to the request object in facebookVerificationHandler? Users

Passport-Facebook authentication is not providing email for all Facebook accounts

筅森魡賤 提交于 2019-12-17 17:35:19
问题 I am using Passport-Facebook authentication. passport.use(new FacebookStrategy({ clientID: 'CLIENT_ID', clientSecret: 'CLIENT_SECRET', callbackURL: "http://www.example.com/auth/facebook/callback" }, function (accessToken, refreshToken, profile, done) { process.nextTick(function () { console.log(profile) }); } )); For some of the Facebook accounts I don't get the email_id and I even tried by using a scope variable such as below, but still I am unable to get the email_id. profileUrl : " " and

PassportJS Session Mixed Up

笑着哭i 提交于 2019-12-14 03:39:55
问题 On our ExpressJS application, when pushed to production server, the passport session gets mixed up at random times. At random, the page can load the view of another user even when I did not log out of my session. Without doing anything else, another refresh will bring me back to my own account (at random too). This phenomenon is happening to two of our web applications coded by two separate users following the Passport guides on their website. Both web apps use Facebook connect/API. This

Node.js/passport-Facebook authentication

随声附和 提交于 2019-12-13 04:42:47
问题 I am trying to implement a simple Facebook login integration using passport (passport-facebook) authentication middleware. Regarding to this documentation over here I have some code here from my server.js : var express = require('express'), passport = require('passport'), FacebookStrategy = require('passport-facebook').Strategy, app = express(); // Facebook authentication: passport.use( new FacebookStrategy({ clientID: "fb client id here", clientSecret: "fb client secret key here",

Node Passport-facebook login in Facebook Page Tab application

蓝咒 提交于 2019-12-12 16:21:40
问题 I'm developing a web application in NodeJS and AngularJS, that is a PageTab application to facebook. For the login I'm using the library Passport-facebook. My middleware is: passport.authenticate('facebook', { display: 'popup', scope: ['read_stream', 'publish_actions', 'email', 'user_photos'] }) The application works if i'm outside the tab of facebook, but when I try into facebook tab, I get an error: [Error] Refused to display'Http....'in a frame because it set 'X-Frame-Options' to 'DENY'.

req.session.passport and req.user blank , and req.isAuthenticated returns false after initial successful login using passport-facebook

妖精的绣舞 提交于 2019-12-12 08:37:25
问题 After the initial successful login from Facebook and login redirection callback using passport-facebook 1.0.3 and express 4.6.1,req.session.passport and req.user contains the value set during the serialize call(which i get from the stragegy) , but on subsequent visits to different routes on the site the req.session.passport and req.user is blank , and req.isAuthenticated() returns false , so after the initial successful login from FB the ensureAuthentication method on all other routes fails .

Passport-facebook unable to connect

我们两清 提交于 2019-12-11 20:15:09
问题 In my application, I'm trying to add loggin with facebook account. As I'm using passport for the moment with local strategy, I tried to add the facebook strategy. I registered on facebook developper site to have my token and secret. I simply copy/paste source code portions from the official passport github, adapting to my personal use. The problem occurs when calling passport.authenticate('facebook'); I am stuck in here and not redirected to the facebook loggin page. My application is waiting

FacebookGraphAPIError: (#210) This call requires a Page access token

孤街浪徒 提交于 2019-12-11 08:36:38
问题 I am using Passport-Facebook strategy for authentication. Please find the code below: new FacebookStrategy( { clientID: authConfig.facebookAuth.clientID, clientSecret: authConfig.facebookAuth.clientSecret, callbackURL: authConfig.facebookAuth.callbackURL, profileURL: "https://graph.facebook.com/v2.10/me", authorizationURL: "https://www.facebook.com/v2.10/dialog/oauth", tokenURL: "https://graph.facebook.com/v2.10/oauth/access_token", profileFields: ["email", "profile_pic", "gender"] },