Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Merge branch 'main' into gitlab-sso

Andrew Atimapref72e240ce543
diff --cc backend/src/ee/routes/v1/sso.ts
index df4242cc89,564073aecc..66733a1248
--- a/backend/src/ee/routes/v1/sso.ts
+++ b/backend/src/ee/routes/v1/sso.ts
@@@ -65,47 -48,21 +48,48 @@@ router.get
ssoController.redirectSSO
);
-router.get("/redirect/saml2/:ssoIdentifier", authLimiter, (req, res, next) => {
- const options = {
- failureRedirect: "/",
- additionalParams: {
- RelayState: req.query.callback_port ?? ""
- }
- };
- passport.authenticate("saml", options)(req, res, next);
-});
+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,
+ (req, res, next) => {
+ const options = {
+ failureRedirect: "/",
+ additionalParams: {
+ RelayState: req.query.callback_port ?? ""
+ },
+ };
+ passport.authenticate("saml", options)(req, res, next);
+ }
+);
- router.post("/saml2/:ssoIdentifier",
- passport.authenticate("saml", {
- failureRedirect: "/login/provider/error",
- failureFlash: true,
+ router.post(
+ "/saml2/:ssoIdentifier",
+ passport.authenticate("saml", {
+ failureRedirect: "/login/provider/error",
+ failureFlash: true,
session: false
}),
ssoController.redirectSSO
diff --cc frontend/src/hooks/api/users/types.ts
index 903bfea3e8,07f497c078..6917bcdc71
--- a/frontend/src/hooks/api/users/types.ts
+++ b/frontend/src/hooks/api/users/types.ts
@@@ -1,13 -1,12 +1,13 @@@
import { UserWsKeyPair } from "../keys/types";
export enum AuthMethod {
- EMAIL = "email",
- GOOGLE = "google",
+ EMAIL = "email",
+ GOOGLE = "google",
GITHUB = "github",
- OKTA_SAML = "okta-saml",
- AZURE_SAML = "azure-saml",
- JUMPCLOUD_SAML = "jumpcloud-saml"
+ GITLAB = "gitlab",
+ OKTA_SAML = "okta-saml",
+ AZURE_SAML = "azure-saml",
+ JUMPCLOUD_SAML = "jumpcloud-saml"
}
export type User = {