mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: github auth
This commit is contained in:
1 parent
8719591faa
commit
ad5344c98b
14 files changed
+127
-2
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user