mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-22 13:27:38 +00:00
fix(loginV2): hide sign-in-with-idp if none are configured (#10402)
<!-- Please inform yourself about the contribution guidelines on submitting a PR here: https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr. Take note of how PR/commit titles should be written and replace the template texts in the sections below. Don't remove any of the sections. It is important that the commit history clearly shows what is changed and why. Important: By submitting a contribution you agree to the terms from our Licensing Policy as described here: https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions. --> # Which Problems Are Solved Don't show the external IdP section, if none are configured. # How the Problems Are Solved - Checks if the length of `identityProviders` is non-empty. # Additional Changes - Added 2 additional null-checks for `identityProviders` # Additional Context - Closes #10401 Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ export default async function Page(props: {
|
||||
<Translated i18nKey="description" namespace="idp" />
|
||||
</p>
|
||||
|
||||
{identityProviders && (
|
||||
{!!identityProviders?.length && (
|
||||
<SignInWithIdp
|
||||
identityProviders={identityProviders}
|
||||
requestId={requestId}
|
||||
|
@@ -78,7 +78,7 @@ export default async function Page(props: {
|
||||
allowRegister={!!loginSettings?.allowRegister}
|
||||
></UsernameForm>
|
||||
|
||||
{identityProviders && loginSettings?.allowExternalIdp && (
|
||||
{loginSettings?.allowExternalIdp && !!identityProviders?.length && (
|
||||
<div className="w-full pb-4 pt-6">
|
||||
<SignInWithIdp
|
||||
identityProviders={identityProviders}
|
||||
|
@@ -80,7 +80,7 @@ export function SignInWithIdp({
|
||||
<p className="ztdl-p text-center">
|
||||
<Translated i18nKey="orSignInWith" namespace="idp" />
|
||||
</p>
|
||||
{!!identityProviders.length && identityProviders?.map(renderIDPButton)}
|
||||
{!!identityProviders?.length && identityProviders?.map(renderIDPButton)}
|
||||
{state?.error && (
|
||||
<div className="py-4">
|
||||
<Alert>{state?.error}</Alert>
|
||||
|
Reference in New Issue
Block a user