Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use PhoneGap with Facebook login and Passport.js

I struggle to find a full example of PhoneGap app using Facebook login that integrates nicely with passport.js.

If seems like the PhoneGap FB plugin is returning AccessToken while passport FB plugin expect to work with code and then replace it with AccessToken.

Any such full example?

like image 343
Guy Korland Avatar asked Dec 17 '14 07:12

Guy Korland


1 Answers

There is no way as far as I know. Passport.js is for web applications and the strategy does the redirect dance of oauth, which gives you an access token at the end.

On the other hand you seen to be using the facebook native login flow that gives you an different type of access token.

It will be easier if you add/explain why you need passport in the first place.

Edit

It seems this is the passport strategy you need: passport-facebook-token

like image 127
José F. Romaniello Avatar answered Oct 03 '22 23:10

José F. Romaniello