diff --git a/frontend/src/components/signup/InitialSignupStep.tsx b/frontend/src/components/signup/InitialSignupStep.tsx
index e5c23f3334..8df6759132 100644
--- a/frontend/src/components/signup/InitialSignupStep.tsx
+++ b/frontend/src/components/signup/InitialSignupStep.tsx
@@ -1,9 +1,13 @@
+import { useCallback } from "react";
import { useTranslation } from "react-i18next";
import Link from "next/link";
import { faGithub, faGitlab, faGoogle } from "@fortawesome/free-brands-svg-icons";
import { faEnvelope } from "@fortawesome/free-regular-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { useServerConfig } from "@app/context";
+import { LoginMethod } from "@app/hooks/api/admin/types";
+
import { Button } from "../v2";
export default function InitialSignupStep({
@@ -12,67 +16,82 @@ export default function InitialSignupStep({
setIsSignupWithEmail: (value: boolean) => void;
}) {
const { t } = useTranslation();
+ const { config } = useServerConfig();
+
+ const shouldDisplaySignupMethod = useCallback(
+ (method: LoginMethod) =>
+ !config.enabledLoginMethods || config.enabledLoginMethods.includes(method),
+ [config]
+ );
return (
{t("signup.initial-title")}
-
-
-
-
-
-
-
-
-
-
-
-
+ {shouldDisplaySignupMethod(LoginMethod.GOOGLE) && (
+
+
+
+ )}
+ {shouldDisplaySignupMethod(LoginMethod.GITHUB) && (
+
+
+
+ )}
+ {shouldDisplaySignupMethod(LoginMethod.GITLAB) && (
+
+
+
+ )}
+ {shouldDisplaySignupMethod(LoginMethod.EMAIL) && (
+
+
+
+ )}
{t("signup.create-policy")}