feat: github auth

This commit is contained in:
Annie Huang committed 2023-10-12 16:12:07 +08:00
1 parent 8719591faa
commit ad5344c98b
14 files changed
+127 -2

No files matched your search

+11
View File
@@ -43,4 +43,15 @@ if (enabledMethods.google) {
)
}
if (enabledMethods.github) {
router.get('/github', passport.authenticate('github'))
router.get(
'/github/callback',
passport.authenticate('github', {
successRedirect: '/',
failureRedirect: '/login',
})
)
}
export default router