Social is now optional on the kcContext

This commit is contained in:
Joseph Garrone
2024-09-09 07:51:49 +02:00
parent 28990a12da
commit b8a08f0789
4 changed files with 5 additions and 17 deletions

View File

@ -43,7 +43,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
}
socialProvidersNode={
<>
{realm.password && social.providers !== undefined && social.providers.length !== 0 && (
{realm.password && social?.providers !== undefined && social.providers.length !== 0 && (
<div id="kc-social-providers" className={kcClsx("kcFormSocialAccountSectionClass")}>
<hr />
<h2>{msg("identity-provider-login-label")}</h2>

View File

@ -40,7 +40,7 @@ export default function LoginUsername(props: PageProps<Extract<KcContext, { page
headerNode={msg("doLogIn")}
socialProvidersNode={
<>
{realm.password && social.providers !== undefined && social.providers.length !== 0 && (
{realm.password && social?.providers !== undefined && social.providers.length !== 0 && (
<div id="kc-social-providers" className={kcClsx("kcFormSocialAccountSectionClass")}>
<hr />
<h2>{msg("identity-provider-login-label")}</h2>