@oussemasahbeni/keycloakify-login-shadcn 250004.0.3 → 250004.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/keycloak-theme/components/langauges.tsx +1 -1
  2. package/keycloak-theme/components/theme-toggle.tsx +0 -1
  3. package/keycloak-theme/components/ui/alert.tsx +1 -2
  4. package/keycloak-theme/components/ui/button.tsx +1 -2
  5. package/keycloak-theme/components/ui/card.tsx +0 -1
  6. package/keycloak-theme/components/ui/checkbox.tsx +0 -1
  7. package/keycloak-theme/components/ui/dropdown-menu.tsx +14 -4
  8. package/keycloak-theme/components/ui/field.tsx +0 -1
  9. package/keycloak-theme/components/ui/input-otp.tsx +0 -1
  10. package/keycloak-theme/components/ui/input.tsx +0 -1
  11. package/keycloak-theme/components/ui/label.tsx +1 -2
  12. package/keycloak-theme/components/ui/radio-group.tsx +0 -1
  13. package/keycloak-theme/components/ui/select.tsx +12 -4
  14. package/keycloak-theme/components/ui/separator.tsx +0 -1
  15. package/keycloak-theme/components/ui/tooltip.tsx +0 -1
  16. package/keycloak-theme/login/KcContext.ts +23 -23
  17. package/keycloak-theme/login/KcPage.tsx +45 -47
  18. package/keycloak-theme/login/assets/img/auth-logo.svg +100 -100
  19. package/keycloak-theme/login/assets/img/shape.svg +71 -71
  20. package/keycloak-theme/login/components/LogoutOtherSessions.tsx +24 -26
  21. package/keycloak-theme/login/components/PasswordWrapper.tsx +35 -35
  22. package/keycloak-theme/login/components/Template/Template.tsx +279 -227
  23. package/keycloak-theme/login/components/Template/index.ts +1 -1
  24. package/keycloak-theme/login/components/Template/useInitializeTemplate.ts +61 -61
  25. package/keycloak-theme/login/components/UserProfileFormFields/AddRemoveButtonsMultiValuedAttribute.tsx +65 -61
  26. package/keycloak-theme/login/components/UserProfileFormFields/DO_MAKE_USER_CONFIRM_PASSWORD.ts +2 -2
  27. package/keycloak-theme/login/components/UserProfileFormFields/FieldErrors.tsx +33 -29
  28. package/keycloak-theme/login/components/UserProfileFormFields/GroupLabel.tsx +90 -71
  29. package/keycloak-theme/login/components/UserProfileFormFields/InputFieldByType.tsx +66 -59
  30. package/keycloak-theme/login/components/UserProfileFormFields/InputLabel.tsx +0 -1
  31. package/keycloak-theme/login/components/UserProfileFormFields/InputTag.tsx +133 -116
  32. package/keycloak-theme/login/components/UserProfileFormFields/InputTagSelects.tsx +150 -136
  33. package/keycloak-theme/login/components/UserProfileFormFields/SelectTag.tsx +135 -114
  34. package/keycloak-theme/login/components/UserProfileFormFields/TextareaTag.tsx +55 -43
  35. package/keycloak-theme/login/components/UserProfileFormFields/UserProfileFormFields.tsx +133 -127
  36. package/keycloak-theme/login/components/UserProfileFormFields/index.ts +1 -1
  37. package/keycloak-theme/login/i18n.ts +47 -47
  38. package/keycloak-theme/login/mocks/KcPageStory.tsx +6 -2
  39. package/keycloak-theme/login/mocks/getKcContextMock.ts +22 -22
  40. package/keycloak-theme/login/pages/PageIndex.tsx +130 -134
  41. package/keycloak-theme/login/pages/code/Page.stories.tsx +57 -70
  42. package/keycloak-theme/login/pages/code/Page.tsx +89 -89
  43. package/keycloak-theme/login/pages/code/index.ts +3 -3
  44. package/keycloak-theme/login/pages/delete-account-confirm/Page.stories.tsx +37 -46
  45. package/keycloak-theme/login/pages/delete-account-confirm/Page.tsx +60 -63
  46. package/keycloak-theme/login/pages/delete-account-confirm/index.ts +3 -3
  47. package/keycloak-theme/login/pages/delete-credential/Page.stories.tsx +25 -30
  48. package/keycloak-theme/login/pages/delete-credential/Page.tsx +56 -51
  49. package/keycloak-theme/login/pages/delete-credential/index.ts +3 -3
  50. package/keycloak-theme/login/pages/error/Page.stories.tsx +46 -58
  51. package/keycloak-theme/login/pages/error/Page.tsx +43 -42
  52. package/keycloak-theme/login/pages/error/index.ts +3 -3
  53. package/keycloak-theme/login/pages/frontchannel-logout/Page.stories.tsx +25 -32
  54. package/keycloak-theme/login/pages/frontchannel-logout/Page.tsx +82 -84
  55. package/keycloak-theme/login/pages/frontchannel-logout/index.ts +3 -3
  56. package/keycloak-theme/login/pages/idp-review-user-profile/Page.stories.tsx +46 -59
  57. package/keycloak-theme/login/pages/idp-review-user-profile/Page.tsx +49 -52
  58. package/keycloak-theme/login/pages/idp-review-user-profile/index.ts +3 -3
  59. package/keycloak-theme/login/pages/info/Page.stories.tsx +50 -60
  60. package/keycloak-theme/login/pages/info/Page.tsx +94 -92
  61. package/keycloak-theme/login/pages/link-idp-action/Page.stories.tsx +32 -16
  62. package/keycloak-theme/login/pages/link-idp-action/Page.tsx +45 -43
  63. package/keycloak-theme/login/pages/link-idp-action/index.ts +3 -3
  64. package/keycloak-theme/login/pages/login/Form.tsx +242 -242
  65. package/keycloak-theme/login/pages/login/Info.tsx +29 -29
  66. package/keycloak-theme/login/pages/login/Page.stories.tsx +346 -365
  67. package/keycloak-theme/login/pages/login/Page.tsx +43 -44
  68. package/keycloak-theme/login/pages/login/SocialProviders.tsx +93 -107
  69. package/keycloak-theme/login/pages/login/index.ts +3 -3
  70. package/keycloak-theme/login/pages/login/providers/apple.svg +3 -3
  71. package/keycloak-theme/login/pages/login/providers/bitbucket.svg +11 -11
  72. package/keycloak-theme/login/pages/login/providers/discord.svg +4 -4
  73. package/keycloak-theme/login/pages/login/providers/facebook.svg +5 -5
  74. package/keycloak-theme/login/pages/login/providers/github.svg +3 -3
  75. package/keycloak-theme/login/pages/login/providers/gitlab.svg +7 -7
  76. package/keycloak-theme/login/pages/login/providers/google.svg +7 -7
  77. package/keycloak-theme/login/pages/login/providers/instagram.svg +31 -31
  78. package/keycloak-theme/login/pages/login/providers/linkedin.svg +3 -3
  79. package/keycloak-theme/login/pages/login/providers/microsoft.svg +6 -6
  80. package/keycloak-theme/login/pages/login/providers/oidc.svg +5 -5
  81. package/keycloak-theme/login/pages/login/providers/openshift.svg +7 -7
  82. package/keycloak-theme/login/pages/login/providers/paypal.svg +6 -6
  83. package/keycloak-theme/login/pages/login/providers/slack.svg +11 -11
  84. package/keycloak-theme/login/pages/login/providers/stackoverflow.svg +5 -5
  85. package/keycloak-theme/login/pages/login/providers/x.svg +3 -3
  86. package/keycloak-theme/login/pages/login/useProviderLogos.tsx +39 -39
  87. package/keycloak-theme/login/pages/login/useScript.tsx +62 -62
  88. package/keycloak-theme/login/pages/login-config-totp/Page.stories.tsx +45 -60
  89. package/keycloak-theme/login/pages/login-config-totp/Page.tsx +253 -240
  90. package/keycloak-theme/login/pages/login-config-totp/index.ts +3 -3
  91. package/keycloak-theme/login/pages/login-idp-link-confirm/Page.stories.tsx +30 -35
  92. package/keycloak-theme/login/pages/login-idp-link-confirm/Page.tsx +40 -43
  93. package/keycloak-theme/login/pages/login-idp-link-confirm/index.ts +3 -3
  94. package/keycloak-theme/login/pages/login-idp-link-confirm-override/Page.stories.tsx +16 -23
  95. package/keycloak-theme/login/pages/login-idp-link-confirm-override/Page.tsx +44 -47
  96. package/keycloak-theme/login/pages/login-idp-link-confirm-override/index.ts +3 -3
  97. package/keycloak-theme/login/pages/login-idp-link-email/Page.stories.tsx +54 -63
  98. package/keycloak-theme/login/pages/login-idp-link-email/Page.tsx +51 -54
  99. package/keycloak-theme/login/pages/login-idp-link-email/index.ts +3 -3
  100. package/keycloak-theme/login/pages/login-oauth-grant/Page.stories.tsx +39 -45
  101. package/keycloak-theme/login/pages/login-oauth-grant/Page.tsx +136 -126
  102. package/keycloak-theme/login/pages/login-oauth-grant/index.ts +3 -3
  103. package/keycloak-theme/login/pages/login-oauth2-device-verify-user-code/Page.stories.tsx +38 -48
  104. package/keycloak-theme/login/pages/login-oauth2-device-verify-user-code/Page.tsx +56 -58
  105. package/keycloak-theme/login/pages/login-oauth2-device-verify-user-code/index.ts +3 -3
  106. package/keycloak-theme/login/pages/login-otp/Page.stories.tsx +82 -97
  107. package/keycloak-theme/login/pages/login-otp/Page.tsx +117 -108
  108. package/keycloak-theme/login/pages/login-otp/index.ts +3 -3
  109. package/keycloak-theme/login/pages/login-page-expired/Page.stories.tsx +28 -37
  110. package/keycloak-theme/login/pages/login-page-expired/Page.tsx +45 -47
  111. package/keycloak-theme/login/pages/login-page-expired/index.ts +3 -3
  112. package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/Page.stories.tsx +20 -0
  113. package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/Page.tsx +290 -233
  114. package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/index.ts +3 -3
  115. package/keycloak-theme/login/pages/login-passkeys-conditional-authenticate/useScript.tsx +63 -63
  116. package/keycloak-theme/login/pages/login-password/Page.stories.tsx +55 -56
  117. package/keycloak-theme/login/pages/login-password/Page.tsx +148 -149
  118. package/keycloak-theme/login/pages/login-password/index.ts +3 -3
  119. package/keycloak-theme/login/pages/login-password/useScript.tsx +62 -63
  120. package/keycloak-theme/login/pages/login-recovery-authn-code-config/Page.stories.tsx +28 -36
  121. package/keycloak-theme/login/pages/login-recovery-authn-code-config/Page.tsx +178 -181
  122. package/keycloak-theme/login/pages/login-recovery-authn-code-config/index.ts +3 -3
  123. package/keycloak-theme/login/pages/login-recovery-authn-code-config/useScript.tsx +145 -145
  124. package/keycloak-theme/login/pages/login-recovery-authn-code-input/Page.stories.tsx +16 -22
  125. package/keycloak-theme/login/pages/login-recovery-authn-code-input/Page.tsx +69 -70
  126. package/keycloak-theme/login/pages/login-recovery-authn-code-input/index.ts +3 -3
  127. package/keycloak-theme/login/pages/login-reset-otp/Page.stories.tsx +62 -75
  128. package/keycloak-theme/login/pages/login-reset-otp/Page.tsx +85 -86
  129. package/keycloak-theme/login/pages/login-reset-otp/index.ts +3 -3
  130. package/keycloak-theme/login/pages/login-reset-password/Form.tsx +67 -68
  131. package/keycloak-theme/login/pages/login-reset-password/Page.stories.tsx +44 -55
  132. package/keycloak-theme/login/pages/login-reset-password/Page.tsx +27 -27
  133. package/keycloak-theme/login/pages/login-reset-password/index.ts +3 -3
  134. package/keycloak-theme/login/pages/login-update-password/Page.stories.tsx +40 -51
  135. package/keycloak-theme/login/pages/login-update-password/Page.tsx +109 -111
  136. package/keycloak-theme/login/pages/login-update-password/index.ts +3 -3
  137. package/keycloak-theme/login/pages/login-update-profile/Page.stories.tsx +28 -37
  138. package/keycloak-theme/login/pages/login-update-profile/Page.tsx +67 -68
  139. package/keycloak-theme/login/pages/login-update-profile/index.ts +3 -3
  140. package/keycloak-theme/login/pages/login-username/Page.stories.tsx +32 -43
  141. package/keycloak-theme/login/pages/login-username/Page.tsx +246 -246
  142. package/keycloak-theme/login/pages/login-username/index.ts +3 -3
  143. package/keycloak-theme/login/pages/login-username/useScript.tsx +62 -62
  144. package/keycloak-theme/login/pages/login-verify-email/Page.stories.tsx +68 -81
  145. package/keycloak-theme/login/pages/login-verify-email/Page.tsx +37 -38
  146. package/keycloak-theme/login/pages/login-verify-email/index.ts +3 -3
  147. package/keycloak-theme/login/pages/login-x509-info/Page.stories.tsx +29 -38
  148. package/keycloak-theme/login/pages/login-x509-info/Page.tsx +72 -75
  149. package/keycloak-theme/login/pages/login-x509-info/index.ts +3 -3
  150. package/keycloak-theme/login/pages/logout-confirm/Page.stories.tsx +34 -43
  151. package/keycloak-theme/login/pages/logout-confirm/Page.tsx +50 -53
  152. package/keycloak-theme/login/pages/logout-confirm/index.ts +3 -3
  153. package/keycloak-theme/login/pages/register/Form.tsx +107 -106
  154. package/keycloak-theme/login/pages/register/Page.stories.tsx +40 -14
  155. package/keycloak-theme/login/pages/register/Page.tsx +26 -26
  156. package/keycloak-theme/login/pages/register/TermsAcceptance.tsx +55 -56
  157. package/keycloak-theme/login/pages/register/index.ts +3 -3
  158. package/keycloak-theme/login/pages/saml-post-form/Page.stories.tsx +16 -23
  159. package/keycloak-theme/login/pages/saml-post-form/Page.tsx +64 -66
  160. package/keycloak-theme/login/pages/saml-post-form/index.ts +3 -3
  161. package/keycloak-theme/login/pages/select-authenticator/Page.stories.tsx +83 -96
  162. package/keycloak-theme/login/pages/select-authenticator/Page.tsx +97 -100
  163. package/keycloak-theme/login/pages/select-authenticator/index.ts +3 -3
  164. package/keycloak-theme/login/pages/select-organization/Page.stories.tsx +62 -49
  165. package/keycloak-theme/login/pages/select-organization/Page.tsx +123 -126
  166. package/keycloak-theme/login/pages/select-organization/index.ts +3 -3
  167. package/keycloak-theme/login/pages/terms/Page.stories.tsx +15 -0
  168. package/keycloak-theme/login/pages/terms/Page.tsx +49 -51
  169. package/keycloak-theme/login/pages/terms/index.ts +3 -3
  170. package/keycloak-theme/login/pages/update-email/Page.stories.tsx +27 -36
  171. package/keycloak-theme/login/pages/update-email/Page.tsx +61 -62
  172. package/keycloak-theme/login/pages/update-email/index.ts +3 -3
  173. package/keycloak-theme/login/pages/webauthn-authenticate/Page.stories.tsx +112 -127
  174. package/keycloak-theme/login/pages/webauthn-authenticate/Page.tsx +206 -202
  175. package/keycloak-theme/login/pages/webauthn-authenticate/index.ts +3 -3
  176. package/keycloak-theme/login/pages/webauthn-authenticate/useScript.tsx +55 -55
  177. package/keycloak-theme/login/pages/webauthn-error/Page.stories.tsx +52 -67
  178. package/keycloak-theme/login/pages/webauthn-error/Page.tsx +70 -73
  179. package/keycloak-theme/login/pages/webauthn-error/index.ts +3 -3
  180. package/keycloak-theme/login/pages/webauthn-register/Page.stories.tsx +39 -50
  181. package/keycloak-theme/login/pages/webauthn-register/Page.tsx +78 -78
  182. package/keycloak-theme/login/pages/webauthn-register/index.ts +3 -3
  183. package/keycloak-theme/login/pages/webauthn-register/useScript.tsx +62 -62
  184. package/keycloak-theme/login/shared/getColorScheme.ts +45 -45
  185. package/keycloak-theme/login/styleLevelCustomization.tsx +34 -36
  186. package/keycloak-theme/public/site.webmanifest +11 -1
  187. package/package.json +6 -2
@@ -1,365 +1,346 @@
1
- import { KcContextExtension } from '@/login/KcContext';
2
- import { KcContext } from '@keycloakify/login-ui/core/KcContext/KcContext';
3
- import { DeepPartial } from '@keycloakify/login-ui/tools/DeepPartial';
4
- import { JSX } from 'react/jsx-runtime';
5
- import { createKcPageStory, type Meta, type StoryObj } from "../../mocks/KcPageStory";
6
-
7
-
8
- const { KcPageStory } = createKcPageStory({ pageId: "login.ftl" });
9
-
10
- const meta = {
11
- title: "login/login.ftl",
12
- component: KcPageStory
13
- } satisfies Meta<typeof KcPageStory>;
14
-
15
- export default meta;
16
-
17
- type Story = StoryObj<typeof meta>;
18
-
19
- export const Default: Story = {
20
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => <KcPageStory {...args} />
21
- };
22
-
23
- export const WithInvalidCredential: Story = {
24
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
25
- <KcPageStory
26
- {...args}
27
- kcContext={{
28
- login: {
29
- username: "johndoe"
30
- },
31
- messagesPerField: {
32
- // NOTE: The other functions of messagesPerField are derived from get() and
33
- // existsError() so they are the only ones that need to mock.
34
- existsError: (fieldName: string, ...otherFieldNames: string[]) => {
35
- const fieldNames = [fieldName, ...otherFieldNames];
36
- return (
37
- fieldNames.includes("username") ||
38
- fieldNames.includes("password")
39
- );
40
- },
41
- get: (fieldName: string) => {
42
- if (fieldName === "username" || fieldName === "password") {
43
- return "Invalid username or password.";
44
- }
45
- return "";
46
- }
47
- }
48
- }}
49
- />
50
- )
51
- };
52
-
53
- export const WithoutRegistration: Story = {
54
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
55
- <KcPageStory
56
- {...args}
57
- kcContext={{
58
- realm: { registrationAllowed: false }
59
- }}
60
- />
61
- )
62
- };
63
-
64
- export const Arabic: Story = {
65
- render: () => (
66
- <KcPageStory
67
- kcContext={{
68
- locale: {
69
- currentLanguageTag: "ar",
70
- rtl: true
71
- }
72
- }}
73
- />
74
- )
75
- };
76
- export const French: Story = {
77
- render: () => (
78
- <KcPageStory
79
- kcContext={{
80
- locale: {
81
- currentLanguageTag: "fr"
82
- }
83
- }}
84
- />
85
- )
86
- };
87
-
88
- export const WithoutRememberMe: Story = {
89
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
90
- <KcPageStory
91
- {...args}
92
- kcContext={{
93
- realm: { rememberMe: false }
94
- }}
95
- />
96
- )
97
- };
98
-
99
- export const WithoutPasswordReset: Story = {
100
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
101
- <KcPageStory
102
- {...args}
103
- kcContext={{
104
- realm: { resetPasswordAllowed: false }
105
- }}
106
- />
107
- )
108
- };
109
-
110
- export const WithEmailAsUsername: Story = {
111
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
112
- <KcPageStory
113
- {...args}
114
- kcContext={{
115
- realm: { loginWithEmailAllowed: false }
116
- }}
117
- />
118
- )
119
- };
120
-
121
- export const WithPresetUsername: Story = {
122
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
123
- <KcPageStory
124
- {...args}
125
- kcContext={{
126
- login: { username: "max.mustermann@mail.com" }
127
- }}
128
- />
129
- )
130
- };
131
-
132
- export const WithImmutablePresetUsername: Story = {
133
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
134
- <KcPageStory
135
- {...args}
136
- kcContext={{
137
- auth: {
138
- attemptedUsername: "max.mustermann@mail.com",
139
- showUsername: true
140
- },
141
- usernameHidden: true,
142
- message: {
143
- type: "info",
144
- summary: "Please re-authenticate to continue"
145
- }
146
- }}
147
- />
148
- )
149
- };
150
- export const WithOneSocialProvider: Story = {
151
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
152
- <KcPageStory
153
- {...args}
154
- kcContext={{
155
- social: {
156
- displayInfo: true,
157
- providers: [
158
- {
159
- loginUrl: "google",
160
- alias: "google",
161
- providerId: "google",
162
- displayName: "Google",
163
- iconClasses: "fa fa-google"
164
- }
165
- ]
166
- }
167
- }}
168
- />
169
- )
170
- };
171
- export const WithTwoSocialProviders: Story = {
172
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
173
- <KcPageStory
174
- {...args}
175
- kcContext={{
176
- social: {
177
- displayInfo: true,
178
- providers: [
179
- {
180
- loginUrl: "google",
181
- alias: "google",
182
- providerId: "google",
183
- displayName: "Google",
184
- iconClasses: "fa fa-google"
185
- },
186
- {
187
- loginUrl: "linkedin",
188
- alias: "linkedin-openid-connect",
189
- providerId: "linkedin-openid-connect",
190
- displayName: "LinkedIn",
191
- iconClasses: "fa fa-linkedin"
192
- }
193
- ]
194
- }
195
- }}
196
- />
197
- )
198
- };
199
-
200
- export const WithTwoSocialProvidersArabic: Story = {
201
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
202
- <KcPageStory
203
- {...args}
204
- kcContext={{
205
- locale: {
206
- currentLanguageTag: "ar",
207
- rtl: true
208
- },
209
- social: {
210
- displayInfo: true,
211
- providers: [
212
- {
213
- loginUrl: "google",
214
- alias: "google",
215
- providerId: "google",
216
- displayName: "Google",
217
- iconClasses: "fa fa-google"
218
- },
219
- {
220
- loginUrl: "linkedin",
221
- alias: "linkedin-openid-connect",
222
- providerId: "linkedin-openid-connect",
223
- displayName: "LinkedIn",
224
- iconClasses: "fa fa-linkedin"
225
- }
226
- ]
227
- }
228
- }}
229
- />
230
- )
231
- };
232
- export const WithSocialProviders: Story = {
233
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
234
- <KcPageStory
235
- {...args}
236
- kcContext={{
237
- social: {
238
- displayInfo: true,
239
- providers: [
240
- {
241
- loginUrl: "google",
242
- alias: "google",
243
- providerId: "google",
244
- displayName: "Google",
245
- iconClasses: "fa fa-google"
246
- },
247
- {
248
- loginUrl: "microsoft",
249
- alias: "microsoft",
250
- providerId: "microsoft",
251
- displayName: "Microsoft",
252
- iconClasses: "fa fa-windows"
253
- },
254
- {
255
- loginUrl: "facebook",
256
- alias: "facebook",
257
- providerId: "facebook",
258
- displayName: "Facebook",
259
- iconClasses: "fa fa-facebook"
260
- },
261
- {
262
- loginUrl: "instagram",
263
- alias: "instagram",
264
- providerId: "instagram",
265
- displayName: "Instagram",
266
- iconClasses: "fa fa-instagram"
267
- },
268
- {
269
- loginUrl: "twitter",
270
- alias: "twitter",
271
- providerId: "twitter",
272
- displayName: "Twitter",
273
- iconClasses: "fa fa-twitter"
274
- },
275
- {
276
- loginUrl: "linkedin",
277
- alias: "linkedin-openid-connect",
278
- providerId: "linkedin-openid-connect",
279
- displayName: "LinkedIn",
280
- iconClasses: "fa fa-linkedin"
281
- },
282
- {
283
- loginUrl: "stackoverflow",
284
- alias: "stackoverflow",
285
- providerId: "stackoverflow",
286
- displayName: "Stackoverflow",
287
- iconClasses: "fa fa-stack-overflow"
288
- },
289
- {
290
- loginUrl: "github",
291
- alias: "github",
292
- providerId: "github",
293
- displayName: "Github",
294
- iconClasses: "fa fa-github"
295
- },
296
- {
297
- loginUrl: "gitlab",
298
- alias: "gitlab",
299
- providerId: "gitlab",
300
- displayName: "Gitlab",
301
- iconClasses: "fa fa-gitlab"
302
- },
303
- {
304
- loginUrl: "bitbucket",
305
- alias: "bitbucket",
306
- providerId: "bitbucket",
307
- displayName: "Bitbucket",
308
- iconClasses: "fa fa-bitbucket"
309
- },
310
- {
311
- loginUrl: "paypal",
312
- alias: "paypal",
313
- providerId: "paypal",
314
- displayName: "PayPal",
315
- iconClasses: "fa fa-paypal"
316
- },
317
- {
318
- loginUrl: "openshift",
319
- alias: "openshift-v4",
320
- providerId: "openshift-v4",
321
- displayName: "OpenShift",
322
- iconClasses: "fa fa-cloud"
323
- }
324
- ]
325
- }
326
- }}
327
- />
328
- )
329
- };
330
-
331
- export const WithoutPasswordField: Story = {
332
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
333
- <KcPageStory
334
- {...args}
335
- kcContext={{
336
- realm: { password: false }
337
- }}
338
- />
339
- )
340
- };
341
-
342
- export const WithWebauthn: Story = {
343
- render: () => (
344
- <KcPageStory
345
- kcContext={{
346
- enableWebAuthnConditionalUI: true
347
- }}
348
- />
349
- )
350
- };
351
-
352
- export const WithErrorMessage: Story = {
353
- render: (args: JSX.IntrinsicAttributes & { kcContext?: DeepPartial<KcContext.Common & { pageId: "login.ftl"; url: { loginResetCredentialsUrl: string; registrationUrl: string; }; realm: { loginWithEmailAllowed: boolean; rememberMe: boolean; password: boolean; resetPasswordAllowed: boolean; registrationAllowed: boolean; }; auth: { selectedCredential?: string; }; registrationDisabled: boolean; login: { username?: string; rememberMe?: string; password?: string; }; usernameHidden?: boolean; social?: { displayInfo: boolean; providers?: { loginUrl: string; alias: string; providerId: string; displayName: string; iconClasses?: string; }[]; }; enableWebAuthnConditionalUI?: boolean; authenticators?: { authenticators: KcContext.WebauthnAuthenticate.WebauthnAuthenticator[]; }; challenge: string; userVerification: KcContext.WebauthnAuthenticate["userVerification"]; rpId: string; createTimeout: number | string; isUserIdentified: "true" | "false"; shouldDisplayAuthenticators?: boolean; } & KcContextExtension> | undefined; }) => (
354
- <KcPageStory
355
- {...args}
356
- kcContext={{
357
- message: {
358
- summary:
359
- "The time allotted for the connection has elapsed.<br/>The login process will restart from the beginning.",
360
- type: "error"
361
- }
362
- }}
363
- />
364
- )
365
- };
1
+ import { createKcPageStory, type Meta, type StoryObj } from "../../mocks/KcPageStory";
2
+
3
+ const { KcPageStory } = createKcPageStory({ pageId: "login.ftl" });
4
+
5
+ const meta = {
6
+ title: "login/login.ftl",
7
+ component: KcPageStory
8
+ } satisfies Meta<typeof KcPageStory>;
9
+
10
+ export default meta;
11
+
12
+ type Story = StoryObj<typeof meta>;
13
+
14
+ export const Default: Story = {};
15
+
16
+ export const Arabic: Story = {
17
+ args: {
18
+ kcContext: {
19
+ locale: {
20
+ currentLanguageTag: "ar",
21
+ rtl: true
22
+ }
23
+ }
24
+ }
25
+ };
26
+ export const French: Story = {
27
+ args: {
28
+ kcContext: {
29
+ locale: {
30
+ currentLanguageTag: "fr",
31
+ rtl: false
32
+ }
33
+ }
34
+ }
35
+ };
36
+
37
+ export const WithInvalidCredential: Story = {
38
+ args: {
39
+ kcContext: {
40
+ login: {
41
+ username: "johndoe"
42
+ },
43
+ messagesPerField: {
44
+ // NOTE: The other functions of messagesPerField are derived from get() and
45
+ // existsError() so they are the only ones that need to mock.
46
+ existsError: (fieldName: string, ...otherFieldNames: string[]) => {
47
+ const fieldNames = [fieldName, ...otherFieldNames];
48
+ return (
49
+ fieldNames.includes("username") || fieldNames.includes("password")
50
+ );
51
+ },
52
+ get: (fieldName: string) => {
53
+ if (fieldName === "username" || fieldName === "password") {
54
+ return "Invalid username or password.";
55
+ }
56
+ return "";
57
+ }
58
+ }
59
+ }
60
+ }
61
+ };
62
+
63
+ export const WithoutRegistration: Story = {
64
+ args: {
65
+ kcContext: {
66
+ realm: { registrationAllowed: false }
67
+ }
68
+ }
69
+ };
70
+
71
+ export const WithoutRememberMe: Story = {
72
+ args: {
73
+ kcContext: {
74
+ realm: { rememberMe: false }
75
+ }
76
+ }
77
+ };
78
+
79
+ export const WithoutPasswordReset: Story = {
80
+ args: {
81
+ kcContext: {
82
+ realm: { resetPasswordAllowed: false }
83
+ }
84
+ }
85
+ };
86
+
87
+ export const WithEmailAsUsername: Story = {
88
+ args: {
89
+ kcContext: {
90
+ realm: { loginWithEmailAllowed: false }
91
+ }
92
+ }
93
+ };
94
+
95
+ export const WithPresetUsername: Story = {
96
+ args: {
97
+ kcContext: {
98
+ login: { username: "max.mustermann@mail.com" }
99
+ }
100
+ }
101
+ };
102
+
103
+ export const WithImmutablePresetUsername: Story = {
104
+ args: {
105
+ kcContext: {
106
+ auth: {
107
+ attemptedUsername: "max.mustermann@mail.com",
108
+ showUsername: true
109
+ },
110
+ usernameHidden: true,
111
+ message: {
112
+ type: "info",
113
+ summary: "Please re-authenticate to continue"
114
+ }
115
+ }
116
+ }
117
+ };
118
+
119
+ export const WithSocialProviders: Story = {
120
+ args: {
121
+ kcContext: {
122
+ social: {
123
+ displayInfo: true,
124
+ providers: [
125
+ {
126
+ loginUrl: "google",
127
+ alias: "google",
128
+ providerId: "google",
129
+ displayName: "Google",
130
+ iconClasses: "fa fa-google"
131
+ },
132
+ {
133
+ loginUrl: "microsoft",
134
+ alias: "microsoft",
135
+ providerId: "microsoft",
136
+ displayName: "Microsoft",
137
+ iconClasses: "fa fa-windows"
138
+ },
139
+ {
140
+ loginUrl: "facebook",
141
+ alias: "facebook",
142
+ providerId: "facebook",
143
+ displayName: "Facebook",
144
+ iconClasses: "fa fa-facebook"
145
+ },
146
+ {
147
+ loginUrl: "instagram",
148
+ alias: "instagram",
149
+ providerId: "instagram",
150
+ displayName: "Instagram",
151
+ iconClasses: "fa fa-instagram"
152
+ },
153
+ {
154
+ loginUrl: "twitter",
155
+ alias: "twitter",
156
+ providerId: "twitter",
157
+ displayName: "Twitter",
158
+ iconClasses: "fa fa-twitter"
159
+ },
160
+ {
161
+ loginUrl: "linkedin",
162
+ alias: "linkedin",
163
+ providerId: "linkedin",
164
+ displayName: "LinkedIn",
165
+ iconClasses: "fa fa-linkedin"
166
+ },
167
+ {
168
+ loginUrl: "stackoverflow",
169
+ alias: "stackoverflow",
170
+ providerId: "stackoverflow",
171
+ displayName: "Stackoverflow",
172
+ iconClasses: "fa fa-stack-overflow"
173
+ },
174
+ {
175
+ loginUrl: "github",
176
+ alias: "github",
177
+ providerId: "github",
178
+ displayName: "Github",
179
+ iconClasses: "fa fa-github"
180
+ },
181
+ {
182
+ loginUrl: "gitlab",
183
+ alias: "gitlab",
184
+ providerId: "gitlab",
185
+ displayName: "Gitlab",
186
+ iconClasses: "fa fa-gitlab"
187
+ },
188
+ {
189
+ loginUrl: "bitbucket",
190
+ alias: "bitbucket",
191
+ providerId: "bitbucket",
192
+ displayName: "Bitbucket",
193
+ iconClasses: "fa fa-bitbucket"
194
+ },
195
+ {
196
+ loginUrl: "paypal",
197
+ alias: "paypal",
198
+ providerId: "paypal",
199
+ displayName: "PayPal",
200
+ iconClasses: "fa fa-paypal"
201
+ },
202
+ {
203
+ loginUrl: "openshift",
204
+ alias: "openshift",
205
+ providerId: "openshift",
206
+ displayName: "OpenShift",
207
+ iconClasses: "fa fa-cloud"
208
+ }
209
+ ]
210
+ }
211
+ }
212
+ }
213
+ };
214
+
215
+ export const WithoutPasswordField: Story = {
216
+ args: {
217
+ kcContext: {
218
+ realm: { password: false }
219
+ }
220
+ }
221
+ };
222
+
223
+ export const WithErrorMessage: Story = {
224
+ args: {
225
+ kcContext: {
226
+ message: {
227
+ summary:
228
+ "The time allotted for the connection has elapsed.<br/>The login process will restart from the beginning.",
229
+ type: "error"
230
+ }
231
+ }
232
+ }
233
+ };
234
+
235
+ export const WithOneSocialProvider: Story = {
236
+ args: {
237
+ kcContext: {
238
+ social: {
239
+ displayInfo: true,
240
+ providers: [
241
+ {
242
+ loginUrl: "google",
243
+ alias: "google",
244
+ providerId: "google",
245
+ displayName: "Google",
246
+ iconClasses: "fa fa-google"
247
+ }
248
+ ]
249
+ }
250
+ }
251
+ }
252
+ };
253
+
254
+ export const WithTwoSocialProviders: Story = {
255
+ args: {
256
+ kcContext: {
257
+ social: {
258
+ displayInfo: true,
259
+ providers: [
260
+ {
261
+ loginUrl: "google",
262
+ alias: "google",
263
+ providerId: "google",
264
+ displayName: "Google",
265
+ iconClasses: "fa fa-google"
266
+ },
267
+ {
268
+ loginUrl: "microsoft",
269
+ alias: "microsoft",
270
+ providerId: "microsoft",
271
+ displayName: "Microsoft",
272
+ iconClasses: "fa fa-windows"
273
+ }
274
+ ]
275
+ }
276
+ }
277
+ }
278
+ };
279
+ export const WithNoSocialProviders: Story = {
280
+ args: {
281
+ kcContext: {
282
+ social: {
283
+ displayInfo: true,
284
+ providers: []
285
+ }
286
+ }
287
+ }
288
+ };
289
+ export const WithMoreThanTwoSocialProviders: Story = {
290
+ args: {
291
+ kcContext: {
292
+ social: {
293
+ displayInfo: true,
294
+ providers: [
295
+ {
296
+ loginUrl: "google",
297
+ alias: "google",
298
+ providerId: "google",
299
+ displayName: "Google",
300
+ iconClasses: "fa fa-google"
301
+ },
302
+ {
303
+ loginUrl: "microsoft",
304
+ alias: "microsoft",
305
+ providerId: "microsoft",
306
+ displayName: "Microsoft",
307
+ iconClasses: "fa fa-windows"
308
+ },
309
+ {
310
+ loginUrl: "facebook",
311
+ alias: "facebook",
312
+ providerId: "facebook",
313
+ displayName: "Facebook",
314
+ iconClasses: "fa fa-facebook"
315
+ },
316
+ {
317
+ loginUrl: "twitter",
318
+ alias: "twitter",
319
+ providerId: "twitter",
320
+ displayName: "Twitter",
321
+ iconClasses: "fa fa-twitter"
322
+ }
323
+ ]
324
+ }
325
+ }
326
+ }
327
+ };
328
+ export const WithSocialProvidersAndWithoutRememberMe: Story = {
329
+ args: {
330
+ kcContext: {
331
+ social: {
332
+ displayInfo: true,
333
+ providers: [
334
+ {
335
+ loginUrl: "google",
336
+ alias: "google",
337
+ providerId: "google",
338
+ displayName: "Google",
339
+ iconClasses: "fa fa-google"
340
+ }
341
+ ]
342
+ },
343
+ realm: { rememberMe: false }
344
+ }
345
+ }
346
+ };