From a4e42a11b9c5cd70006c196e744970436f0db2f3 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 18 Apr 2024 09:52:27 +0200 Subject: [PATCH] Fix controller. --- server/lib/routers/oidc.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/lib/routers/oidc.ts b/server/lib/routers/oidc.ts index 7f575a57..0aa4ca76 100644 --- a/server/lib/routers/oidc.ts +++ b/server/lib/routers/oidc.ts @@ -55,7 +55,7 @@ async function initOIDCRouter (options: RegisterServerOptions): Promise } )) - 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.get('/cb', cbHandler) + router.post('/cb', cbHandler) return router }