Skip to content

Instantly share code, notes, and snippets.

Created Feb 4, 2014
What would you like to do?
jwt and social auth
passport.authenticate('facebook', { failureRedirect: '/error', session: false }),
function(req, res) {
var token = jwt.sign(req.user, secret, { expiresInMinutes: 60*5 });
res.redirect('/#jwt=' + jwt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment