Skip to content

Instantly share code, notes, and snippets.

@RealDeanZhao
Created July 24, 2016 04:54
Show Gist options
  • Save RealDeanZhao/0a7036819a83e1a1c039ab6eefe147fe to your computer and use it in GitHub Desktop.
Save RealDeanZhao/0a7036819a83e1a1c039ab6eefe147fe to your computer and use it in GitHub Desktop.
router.get('/api/v1/auth/github/callback',
return passport.authenticate('github', {sucessRedirect: '/'});
);
==>
router.get('/api/v1/auth/github/callback',
async (ctx: any, next: any) => {
return passport.authenticate('github', (user: any, info: any, status: any) => {
ctx.redirect('/');
})(ctx, next);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment