import { useState } from "react"; import { useTranslation } from "react-i18next"; import { Button, Input } from "@app/components/v2"; type Props = { setStep: (step: number) => void; type: "SAML" | "OIDC"; }; export const SSOStep = ({ setStep, type }: Props) => { const [ssoIdentifier, setSSOIdentifier] = useState(""); const { t } = useTranslation(); const queryParams = new URLSearchParams(window.location.search); const handleSubmission = (e: React.FormEvent) => { e.preventDefault(); const callbackPort = queryParams.get("callback_port"); if (type === "SAML") { window.open( `/api/v1/sso/redirect/saml2/organizations/${ssoIdentifier}${ callbackPort ? `?callback_port=${callbackPort}` : "" }` ); } else { window.open( `/api/v1/sso/oidc/login?orgSlug=${ssoIdentifier}${ callbackPort ? `&callbackPort=${callbackPort}` : "" }` ); } window.close(); }; return (

What's your organization slug?

setSSOIdentifier(e.target.value)} type="text" placeholder="acme-123" isRequired autoComplete="email" id="email" className="h-12" />
); };