I've been searching for hours but can't find a Facebook login solution for Express without Passport or Everyauth. Are there any examples or tutorials about server-side oAuth 2.0 FB login for nodejs? Or is there a way to use the default express sessions and let passport only handle the initial authentication without serializing/deserializing?
I write / maintain the express-stormpath library which does this for ya.
Here's an example app (in it's entirety):
var express = require('express');
var stormpath = require('express-stormpath');
var app = express();
app.use(stormpath.init(app, {
application: 'https://api.stormpath.com/v1/applications/xxx',
secretKey: 'some_long_random_string',
enableFacebook: true,
social: {
facebook: {
appId: 'xxx',
appSecret: 'xxx',
}
},
}));
app.listen(3000);
Obviously, this requires you to create a Facebook app and setup some config options, this doc explains how to do it: https://docs.stormpath.com/nodejs/express/product.html#use-facebook-login
Hope that helps =)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With