Integrated login with Gitlab

This commit is contained in:
Andrew Atimapre
2023-09-24 15:21:23 +01:00
parent f342c345b7
commit 255705501f
10 changed files with 383 additions and 304 deletions
+23
View File
@@ -65,6 +65,29 @@ router.get(
ssoController.redirectSSO
);
router.get(
"/redirect/gitlab",
authLimiter,
(req, res, next) => {
passport.authenticate("gitlab", {
session: false,
...(req.query.callback_port ? {
state: req.query.callback_port as string
} : {})
})(req, res, next);
}
)
router.get(
"/gitlab",
authLimiter,
passport.authenticate("gitlab", {
failureRedirect: "/login/provider/error",
session: false
}),
ssoController.redirectSSO
)
router.get(
"/redirect/saml2/:ssoIdentifier",
authLimiter,