Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. app.get(
  2. '/auth/github',
  3. passport.authenticate('github'),
  4. (req, res) => {
  5. console.log('auth github cb');
  6. },
  7. );
  8.  
  9. app.get(
  10. '/auth/github/callback',
  11. passport.authenticate('github', { failureRedirect: '/login' }),
  12. (req, res) => {
  13. console.log('auth/github/callback /')
  14. res.redirect('/');
  15. },
  16. );
  17.  
  18. app.get('/logout', (req, res) => {
  19. req.logout();
  20. res.redirect('/');
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement