mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
auth/github: Migrate to AuthMiddleware
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
dd55c947cc
commit
e4b2acf53e
3 changed files with 38 additions and 33 deletions
|
@ -5,7 +5,7 @@ import { logger } from '../../logger'
|
|||
import { User } from '../../models'
|
||||
import { FacebookMiddleware } from './facebook'
|
||||
import { TwitterMiddleware } from './twitter'
|
||||
import github from './github'
|
||||
import { GithubMiddleware } from './github'
|
||||
import gitlab from './gitlab'
|
||||
import dropbox from './dropbox'
|
||||
import google from './google'
|
||||
|
@ -45,7 +45,7 @@ passport.deserializeUser(function (id: string, done) {
|
|||
|
||||
if (config.isFacebookEnable) AuthRouter.use(FacebookMiddleware.getMiddleware())
|
||||
if (config.isTwitterEnable) AuthRouter.use(TwitterMiddleware.getMiddleware())
|
||||
if (config.isGitHubEnable) AuthRouter.use(github)
|
||||
if (config.isGitHubEnable) AuthRouter.use(GithubMiddleware.getMiddleware())
|
||||
if (config.isGitLabEnable) AuthRouter.use(gitlab)
|
||||
if (config.isDropboxEnable) AuthRouter.use(dropbox)
|
||||
if (config.isGoogleEnable) AuthRouter.use(google)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue