Fix controller.

This commit is contained in:
John Livingston
2024-04-18 09:52:27 +02:00
parent 6c13d2e377
commit a4e42a11b9

View File

@ -55,7 +55,7 @@ async function initOIDCRouter (options: RegisterServerOptions): Promise<Router>
}
))
router.get('/cb', asyncMiddleware(
const cbHandler = asyncMiddleware(
async (req: Request, res: Response, _next: NextFunction) => {
logger.info('[oidc router] OIDC callback call')
try {
@ -98,7 +98,9 @@ async function initOIDCRouter (options: RegisterServerOptions): Promise<Router>
}))
}
}
))
)
router.get('/cb', cbHandler)
router.post('/cb', cbHandler)
return router
}