From 6eab1c22b8fd0282d5d8606f2f1259a8bfa1d93d Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 1 Apr 2022 18:28:59 +0200 Subject: Fix bug involving redirects not working properly --- src/routes/middleware/saml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes/middleware/saml.ts') diff --git a/src/routes/middleware/saml.ts b/src/routes/middleware/saml.ts index 86155c5..cce29a2 100644 --- a/src/routes/middleware/saml.ts +++ b/src/routes/middleware/saml.ts @@ -4,7 +4,7 @@ import { Request, Response, NextFunction } from 'express'; const saml = function (req: Request, res: Response, next: NextFunction): void { const authenticator = new BasicAuthenticator(req, res); if (!authenticator.hasSession()) { - authenticator.redirectToLogin(); + res.redirect(authenticator.buildLoginURL()); return; } next(); -- cgit v1.2.3