Created
June 24, 2017 21:01
-
-
Save animify/4fe39c9a975f1ca9f406aa841db48f79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const router = express.Router() | |
const auth = require('../auth') | |
router.use('/login/callback/github', | |
auth.authenticate('github', { failureRedirect: '/' }), | |
function(req, res) { | |
res.redirect('/') | |
}); | |
router.get('/login/github', auth.authenticate('github')) | |
router.use('/login/callback/twitter', | |
auth.authenticate('twitter', { failureRedirect: '/' }), | |
function(req, res) { | |
res.redirect('/') | |
}); | |
router.get('/login/twitter', auth.authenticate('twitter')) | |
module.exports = router |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment