Social is now optional on the kcContext
This commit is contained in:
parent
28990a12da
commit
b8a08f0789
@ -188,7 +188,7 @@ export declare namespace KcContext {
|
||||
password?: string;
|
||||
};
|
||||
usernameHidden?: boolean;
|
||||
social: {
|
||||
social?: {
|
||||
displayInfo: boolean;
|
||||
providers?: {
|
||||
loginUrl: string;
|
||||
@ -325,7 +325,7 @@ export declare namespace KcContext {
|
||||
rememberMe?: string;
|
||||
};
|
||||
usernameHidden?: boolean;
|
||||
social: Login["social"];
|
||||
social?: Login["social"];
|
||||
};
|
||||
|
||||
export type LoginPassword = Common & {
|
||||
@ -343,9 +343,6 @@ export declare namespace KcContext {
|
||||
showTryAnotherWayLink?: boolean;
|
||||
attemptedUsername?: string;
|
||||
};
|
||||
social: {
|
||||
displayInfo: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
export type WebauthnAuthenticate = Common & {
|
||||
@ -360,9 +357,6 @@ export declare namespace KcContext {
|
||||
createTimeout: string;
|
||||
isUserIdentified: "true" | "false";
|
||||
shouldDisplayAuthenticators: boolean;
|
||||
social: {
|
||||
displayInfo: boolean;
|
||||
};
|
||||
login: {};
|
||||
realm: {
|
||||
password: boolean;
|
||||
|
@ -326,9 +326,6 @@ export const kcContextMocks = [
|
||||
realm: {
|
||||
...kcContextCommonMock.realm,
|
||||
resetPasswordAllowed: true
|
||||
},
|
||||
social: {
|
||||
displayInfo: false
|
||||
}
|
||||
}),
|
||||
id<KcContext.WebauthnAuthenticate>({
|
||||
@ -349,9 +346,6 @@ export const kcContextMocks = [
|
||||
createTimeout: "0",
|
||||
isUserIdentified: "false",
|
||||
shouldDisplayAuthenticators: false,
|
||||
social: {
|
||||
displayInfo: false
|
||||
},
|
||||
login: {}
|
||||
}),
|
||||
id<KcContext.LoginUpdatePassword>({
|
||||
@ -584,7 +578,7 @@ export const kcContextMocks = [
|
||||
challenge: "",
|
||||
userVerification: "not specified",
|
||||
rpId: "",
|
||||
createTimeout: "0",
|
||||
createTimeout: 0,
|
||||
authenticators: {
|
||||
authenticators: []
|
||||
},
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user