diff --git a/README.md b/README.md index 03f842c16..92e39fb13 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Keywind is a component-based Keycloak Login Theme built with [Tailwind CSS](http - Register - Select Authenticator - Terms and Conditions +- Update E-Mail - WebAuthn Authenticate - WebAuthn Error - WebAuthn Register diff --git a/theme/keywind/login/components/molecules/password-commons.ftl b/theme/keywind/login/components/molecules/password-commons.ftl new file mode 100644 index 000000000..89e6331e5 --- /dev/null +++ b/theme/keywind/login/components/molecules/password-commons.ftl @@ -0,0 +1,10 @@ +<#import "../atoms/checkbox.ftl" as checkbox> + +<#macro logoutOtherSessions> + <@checkbox.kw + name="logout-sessions" + label=msg("logoutOtherSessions") + checked=true + value="on" + /> + diff --git a/theme/keywind/login/login-config-totp.ftl b/theme/keywind/login/login-config-totp.ftl index e0b64c634..8a9fe8f76 100644 --- a/theme/keywind/login/login-config-totp.ftl +++ b/theme/keywind/login/login-config-totp.ftl @@ -6,6 +6,7 @@ <#import "components/atoms/link.ftl" as link> <#import "features/labels/totp.ftl" as totpLabel> <#import "features/labels/totp-device.ftl" as totpDeviceLabel> +<#import "components/molecules/password-commons.ftl" as passwordCommons> <#assign totpLabel><@totpLabel.kw /> <#assign totpDeviceLabel><@totpDeviceLabel.kw /> @@ -91,6 +92,9 @@ required=false type="text" /> + + <@passwordCommons.logoutOtherSessions/> + <@buttonGroup.kw> <#if isAppInitiatedAction??> <@button.kw color="primary" type="submit"> diff --git a/theme/keywind/login/login-recovery-authn-code-config.ftl b/theme/keywind/login/login-recovery-authn-code-config.ftl index 186d71080..ea4de7fab 100644 --- a/theme/keywind/login/login-recovery-authn-code-config.ftl +++ b/theme/keywind/login/login-recovery-authn-code-config.ftl @@ -4,6 +4,7 @@ <#import "components/atoms/button-group.ftl" as buttonGroup> <#import "components/atoms/checkbox.ftl" as checkbox> <#import "components/atoms/form.ftl" as form> +<#import "components/molecules/password-commons.ftl" as passwordCommons> <@layout.registrationLayout script="dist/recoveryCodes.js"; section> <#if section="header"> @@ -54,6 +55,7 @@ required="required" x\-ref="confirmationCheck" /> + <@passwordCommons.logoutOtherSessions/> <@buttonGroup.kw> <#if isAppInitiatedAction??> <@button.kw color="primary" type="submit"> diff --git a/theme/keywind/login/login-update-password.ftl b/theme/keywind/login/login-update-password.ftl index ed82380e2..cc2afb6f4 100644 --- a/theme/keywind/login/login-update-password.ftl +++ b/theme/keywind/login/login-update-password.ftl @@ -4,6 +4,7 @@ <#import "components/atoms/checkbox.ftl" as checkbox> <#import "components/atoms/form.ftl" as form> <#import "components/atoms/input.ftl" as input> +<#import "components/molecules/password-commons.ftl" as passwordCommons> <@layout.registrationLayout displayMessage=!messagesPerField.existsError("password", "password-confirm") @@ -37,6 +38,7 @@ name="password-confirm" type="password" /> + <@passwordCommons.logoutOtherSessions/> <#if isAppInitiatedAction??> <@checkbox.kw checked=true diff --git a/theme/keywind/login/update-email.ftl b/theme/keywind/login/update-email.ftl new file mode 100644 index 000000000..c9cba067d --- /dev/null +++ b/theme/keywind/login/update-email.ftl @@ -0,0 +1,43 @@ +<#import "template.ftl" as layout> +<#import "components/atoms/button.ftl" as button> +<#import "components/atoms/button-group.ftl" as buttonGroup> +<#import "components/atoms/form.ftl" as form> +<#import "components/atoms/input.ftl" as input> +<#import "components/molecules/password-commons.ftl" as passwordCommons> + +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('email'); section> + <#if section = "header"> + ${msg("updateEmailTitle")} + <#elseif section = "form"> + <@form.kw action="${url.loginAction}" method="post"> + <@input.kw + autocomplete="off" + autofocus=true + invalid=messagesPerField.existsError("email") + label=msg("email") + message=kcSanitize(messagesPerField.get("email"))?no_esc + name="email" + required=true + type="text" + value=email.value!'' + /> + + <@passwordCommons.logoutOtherSessions/> + + <@buttonGroup.kw> + <#if isAppInitiatedAction??> + <@button.kw color="primary" type="submit"> + ${msg("doSubmit")} + + <@button.kw color="secondary" name="cancel-aia" type="submit" value="true"> + ${msg("doCancel")} + + <#else> + <@button.kw color="primary" type="submit"> + ${msg("doSubmit")} + + + + + + diff --git a/theme/keywind/login/webauthn-register.ftl b/theme/keywind/login/webauthn-register.ftl index 57f4dad87..262f855f2 100644 --- a/theme/keywind/login/webauthn-register.ftl +++ b/theme/keywind/login/webauthn-register.ftl @@ -1,6 +1,7 @@ <#import "template.ftl" as layout> <#import "components/atoms/button.ftl" as button> <#import "components/atoms/button-group.ftl" as buttonGroup> +<#import "components/molecules/password-commons.ftl" as passwordCommons> <@layout.registrationLayout script="dist/webAuthnRegister.js"; section> <#if section="title"> @@ -16,6 +17,7 @@ + <@passwordCommons.logoutOtherSessions/> <@buttonGroup.kw> <@button.kw @click="registerSecurityKey" color="primary" type="submit">