Skip to content

Instantly share code, notes, and snippets.

@gaboelnuevo
Created October 13, 2016 03:59
Show Gist options
  • Save gaboelnuevo/9375023daefd4b26b711287267ca903a to your computer and use it in GitHub Desktop.
Save gaboelnuevo/9375023daefd4b26b711287267ca903a to your computer and use it in GitHub Desktop.
loopback.io: Facebook login with out cookie (only json)
npm install --save passport-facebook-token
Then add this entry in providers.json:
"facebook-mobile" : {
"provider": "facebook-token",
"module": "passport-facebook-token",
"strategy": "FacebookTokenStrategy",
"clientID": "XXXXXXX",
"clientSecret": "XXXXXXX",
"callbackPath": "/auth/facebook-token/callback",
"session" : false,
"json":true,
"scope": ["email"]
}
then you are ready to go with a rest call at /auth/facebook-token/callback?access_token=CAAGqQJa4ShcB...
Via: https://github.com/strongloop/loopback-component-passport/issues/83#issuecomment-206901732
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment