diff --git a/frontend/src/components/signup/InitialSignupStep.tsx b/frontend/src/components/signup/InitialSignupStep.tsx index 3a7c6db04..fd63f33f0 100644 --- a/frontend/src/components/signup/InitialSignupStep.tsx +++ b/frontend/src/components/signup/InitialSignupStep.tsx @@ -4,6 +4,7 @@ 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 { RegionSelect } from "@app/components/navigation/RegionSelect"; import { useServerConfig } from "@app/context"; import { LoginMethod } from "@app/hooks/api/admin/types"; @@ -25,6 +26,7 @@ export default function InitialSignupStep({

{t("signup.initial-title")}

+ {shouldDisplaySignupMethod(LoginMethod.GOOGLE) && (
-
- )} - {shouldDisplayLoginMethod(LoginMethod.GITHUB) && ( -
- -
- )} - {shouldDisplayLoginMethod(LoginMethod.GITLAB) && ( -
- -
- )} + {shouldDisplayLoginMethod(LoginMethod.SAML) && ( -
+
)} +
+ {shouldDisplayLoginMethod(LoginMethod.GOOGLE) && ( + + { + const callbackPort = queryParams.get("callback_port"); + + window.open( + `/api/v1/sso/redirect/google${ + callbackPort ? `?callback_port=${callbackPort}` : "" + }` + ); + window.close(); + }} + className="h-10 w-full bg-mineshaft-600" + > + + + + )} + {shouldDisplayLoginMethod(LoginMethod.GITHUB) && ( + + { + const callbackPort = queryParams.get("callback_port"); + + window.open( + `/api/v1/sso/redirect/github${ + callbackPort ? `?callback_port=${callbackPort}` : "" + }` + ); + + window.close(); + }} + className="h-10 w-full bg-mineshaft-600" + > + + + + )} + {shouldDisplayLoginMethod(LoginMethod.GITLAB) && ( + + { + const callbackPort = queryParams.get("callback_port"); + + window.open( + `/api/v1/sso/redirect/gitlab${ + callbackPort ? `?callback_port=${callbackPort}` : "" + }` + ); + + window.close(); + }} + className="h-10 w-full bg-mineshaft-600" + > + + + + )} +
{(!config.enabledLoginMethods || (shouldDisplayLoginMethod(LoginMethod.EMAIL) && config.enabledLoginMethods.length > 1)) && (
@@ -316,7 +326,7 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }: />
)} -
+