chore: SAML ACS URL is only shown if the email domain is configured (#11144)

Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
This commit is contained in:
Pepe Fagoaga
2026-05-13 09:38:19 +02:00
committed by GitHub
parent e476bbde2d
commit a883bb30d4
2 changed files with 16 additions and 8 deletions
@@ -253,9 +253,10 @@ export const SamlConfigForm = ({
reader.readAsText(file);
};
const acsUrl = emailDomain
? `${apiBaseUrl}/accounts/saml/${emailDomain}/acs/`
: `${apiBaseUrl}/accounts/saml/your-domain.com/acs/`;
const trimmedEmailDomain = emailDomain.trim();
const acsUrl = trimmedEmailDomain
? `${apiBaseUrl}/accounts/saml/${trimmedEmailDomain}/acs/`
: "";
return (
<form
@@ -308,11 +309,17 @@ export const SamlConfigForm = ({
<span className="mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300">
ACS URL:
</span>
<CodeSnippet
value={acsUrl}
ariaLabel="Copy ACS URL"
className="h-10 w-full"
/>
{acsUrl ? (
<CodeSnippet
value={acsUrl}
ariaLabel="Copy ACS URL"
className="h-10 w-full"
/>
) : (
<p className="text-xs text-gray-500 dark:text-gray-400">
Enter your email domain above to generate the ACS URL.
</p>
)}
</div>
<div>