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;
|
password?: string;
|
||||||
};
|
};
|
||||||
usernameHidden?: boolean;
|
usernameHidden?: boolean;
|
||||||
social: {
|
social?: {
|
||||||
displayInfo: boolean;
|
displayInfo: boolean;
|
||||||
providers?: {
|
providers?: {
|
||||||
loginUrl: string;
|
loginUrl: string;
|
||||||
@ -325,7 +325,7 @@ export declare namespace KcContext {
|
|||||||
rememberMe?: string;
|
rememberMe?: string;
|
||||||
};
|
};
|
||||||
usernameHidden?: boolean;
|
usernameHidden?: boolean;
|
||||||
social: Login["social"];
|
social?: Login["social"];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LoginPassword = Common & {
|
export type LoginPassword = Common & {
|
||||||
@ -343,9 +343,6 @@ export declare namespace KcContext {
|
|||||||
showTryAnotherWayLink?: boolean;
|
showTryAnotherWayLink?: boolean;
|
||||||
attemptedUsername?: string;
|
attemptedUsername?: string;
|
||||||
};
|
};
|
||||||
social: {
|
|
||||||
displayInfo: boolean;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WebauthnAuthenticate = Common & {
|
export type WebauthnAuthenticate = Common & {
|
||||||
@ -360,9 +357,6 @@ export declare namespace KcContext {
|
|||||||
createTimeout: string;
|
createTimeout: string;
|
||||||
isUserIdentified: "true" | "false";
|
isUserIdentified: "true" | "false";
|
||||||
shouldDisplayAuthenticators: boolean;
|
shouldDisplayAuthenticators: boolean;
|
||||||
social: {
|
|
||||||
displayInfo: boolean;
|
|
||||||
};
|
|
||||||
login: {};
|
login: {};
|
||||||
realm: {
|
realm: {
|
||||||
password: boolean;
|
password: boolean;
|
||||||
|
@ -326,9 +326,6 @@ export const kcContextMocks = [
|
|||||||
realm: {
|
realm: {
|
||||||
...kcContextCommonMock.realm,
|
...kcContextCommonMock.realm,
|
||||||
resetPasswordAllowed: true
|
resetPasswordAllowed: true
|
||||||
},
|
|
||||||
social: {
|
|
||||||
displayInfo: false
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
id<KcContext.WebauthnAuthenticate>({
|
id<KcContext.WebauthnAuthenticate>({
|
||||||
@ -349,9 +346,6 @@ export const kcContextMocks = [
|
|||||||
createTimeout: "0",
|
createTimeout: "0",
|
||||||
isUserIdentified: "false",
|
isUserIdentified: "false",
|
||||||
shouldDisplayAuthenticators: false,
|
shouldDisplayAuthenticators: false,
|
||||||
social: {
|
|
||||||
displayInfo: false
|
|
||||||
},
|
|
||||||
login: {}
|
login: {}
|
||||||
}),
|
}),
|
||||||
id<KcContext.LoginUpdatePassword>({
|
id<KcContext.LoginUpdatePassword>({
|
||||||
@ -584,7 +578,7 @@ export const kcContextMocks = [
|
|||||||
challenge: "",
|
challenge: "",
|
||||||
userVerification: "not specified",
|
userVerification: "not specified",
|
||||||
rpId: "",
|
rpId: "",
|
||||||
createTimeout: "0",
|
createTimeout: 0,
|
||||||
authenticators: {
|
authenticators: {
|
||||||
authenticators: []
|
authenticators: []
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ export default function Login(props: PageProps<Extract<KcContext, { pageId: "log
|
|||||||
}
|
}
|
||||||
socialProvidersNode={
|
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")}>
|
<div id="kc-social-providers" className={kcClsx("kcFormSocialAccountSectionClass")}>
|
||||||
<hr />
|
<hr />
|
||||||
<h2>{msg("identity-provider-login-label")}</h2>
|
<h2>{msg("identity-provider-login-label")}</h2>
|
||||||
|
@ -40,7 +40,7 @@ export default function LoginUsername(props: PageProps<Extract<KcContext, { page
|
|||||||
headerNode={msg("doLogIn")}
|
headerNode={msg("doLogIn")}
|
||||||
socialProvidersNode={
|
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")}>
|
<div id="kc-social-providers" className={kcClsx("kcFormSocialAccountSectionClass")}>
|
||||||
<hr />
|
<hr />
|
||||||
<h2>{msg("identity-provider-login-label")}</h2>
|
<h2>{msg("identity-provider-login-label")}</h2>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user