mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-31 01:58:21 +00:00
fix: add hint for password-confirmation (#1863)
* fix:add hint for password-confirmation * Update internal/ui/login/static/i18n/de.yaml Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
parent
32f8545082
commit
fd04fb58d0
@ -1231,7 +1231,7 @@
|
||||
},
|
||||
"BASIC": {
|
||||
"TITLE": "Basic",
|
||||
"DESCRIPTION": "Authentication with Username and Passwort"
|
||||
"DESCRIPTION": "Authentication with Username and Password"
|
||||
},
|
||||
"IMPLICIT": {
|
||||
"TITLE": "Implicit",
|
||||
|
@ -76,7 +76,7 @@ Errors:
|
||||
Password:
|
||||
NotFound: Passoword not found
|
||||
Empty: Password is empty
|
||||
Invalid: Passwort is invalid
|
||||
Invalid: Password is invalid
|
||||
NotSet: User has not set a password
|
||||
PasswordComplexityPolicy:
|
||||
NotFound: Password policy not found
|
||||
@ -174,9 +174,9 @@ Errors:
|
||||
AlreadyExists: Password Complexity Policy already exists
|
||||
PasswordLockout:
|
||||
NotFound: Password Lockout Policy not found
|
||||
Empty: Passwort Lockout Policy is empty
|
||||
NotExisting: Passwort Lockout Policy doesn't exist
|
||||
AlreadyExists: Passwort Lockout Policy already exists
|
||||
Empty: Password Lockout Policy is empty
|
||||
NotExisting: Password Lockout Policy doesn't exist
|
||||
AlreadyExists: Password Lockout Policy already exists
|
||||
PasswordAge:
|
||||
NotFound: Password Age Policy not found
|
||||
Empty: Password Age Policy is empty
|
||||
|
@ -66,6 +66,8 @@ func (l *Login) generatePolicyDescription(r *http.Request, policy *iam_model.Pas
|
||||
hassymbol := l.renderer.LocalizeFromRequest(r, "Password.HasSymbol", nil)
|
||||
description += "<li id=\"symbol\" class=\"invalid\"><i class=\"lgn-icon-times-solid lgn-warn\"></i><span>" + hassymbol + "</span></li>"
|
||||
}
|
||||
confirmation := l.renderer.LocalizeFromRequest(r, "Password.Confirmation", nil)
|
||||
description += "<li id=\"confirmation\" class=\"invalid\"><i class=\"lgn-icon-times-solid lgn-warn\"></i><span>" + confirmation + "</span></li>"
|
||||
|
||||
description += "</ul>"
|
||||
return description, nil
|
||||
|
@ -28,6 +28,7 @@ Password:
|
||||
HasLowercase: Kleinbuchstaben
|
||||
HasNumber: Nummer
|
||||
HasSymbol: Symbol
|
||||
Confirmation: Bestätigung stimmt überein
|
||||
|
||||
UsernameChange:
|
||||
Title: Usernamen ändern
|
||||
|
@ -28,6 +28,7 @@ Password:
|
||||
HasLowercase: Lowercase letter
|
||||
HasNumber: Number
|
||||
HasSymbol: Symbol
|
||||
Confirmation: Confirmation match
|
||||
|
||||
UsernameChange:
|
||||
Title: Change Username
|
||||
@ -52,7 +53,7 @@ InitPassword:
|
||||
NewPasswordConfirm: Confirm Password
|
||||
|
||||
InitPasswordDone:
|
||||
Title: Passwortd set
|
||||
Title: Password set
|
||||
Description: Password successfully set
|
||||
|
||||
InitUser:
|
||||
@ -103,7 +104,7 @@ WebAuthN:
|
||||
Retry: Retry, create a new challenge or choose a different method.
|
||||
|
||||
Passwordless:
|
||||
Title: Login passwordles
|
||||
Title: Login passwordless
|
||||
Description: Verify your token
|
||||
|
||||
PasswordChange:
|
||||
@ -111,7 +112,7 @@ PasswordChange:
|
||||
Description: Change your password. Enter your old and new password.
|
||||
OldPassword: Old Password
|
||||
NewPassword: New Password
|
||||
NewPasswordConfirmation: Passwort confirmation
|
||||
NewPasswordConfirmation: Password confirmation
|
||||
|
||||
PasswordChangeDone:
|
||||
Title: Change Password
|
||||
@ -251,7 +252,7 @@ Errors:
|
||||
Password:
|
||||
ConfirmationWrong: Passwordconfirmation is wrong
|
||||
Empty: Password is empty
|
||||
Invalid: Passwort is invalid
|
||||
Invalid: Password is invalid
|
||||
PasswordComplexityPolicy:
|
||||
NotFound: Password policy not found
|
||||
MinLength: Password is to short
|
||||
|
@ -3,7 +3,7 @@ function CheckChangePwPolicy() {
|
||||
let pwNew = policyElement.value;
|
||||
let pwNewConfirmation = document.getElementById("change-password-confirmation").value;
|
||||
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew) === false) {
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) === false) {
|
||||
policyElement.setAttribute("color", "warn");
|
||||
return false;
|
||||
} else {
|
||||
|
@ -3,7 +3,7 @@ function CheckInitPwPolicy() {
|
||||
let pwNew = policyElement.value;
|
||||
let pwNewConfirmation = document.getElementById("passwordconfirm").value;
|
||||
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew) === false) {
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
function ComplexityPolicyCheck(policyElement, pwNew) {
|
||||
function ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) {
|
||||
let minLength = policyElement.dataset.minlength;
|
||||
let upperRegex = policyElement.dataset.hasUppercase;
|
||||
let lowerRegex = policyElement.dataset.hasLowercase;
|
||||
@ -55,6 +55,14 @@ function ComplexityPolicyCheck(policyElement, pwNew) {
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
let confirmation = document.getElementById('confirmation');
|
||||
if (pwNew === pwNewConfirmation && pwNewConfirmation !== "" ) {
|
||||
ValidPolicy(confirmation);
|
||||
valid = true;
|
||||
} else {
|
||||
InvalidPolicy(confirmation);
|
||||
valid = false;
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ function CheckRegisterPwPolicy() {
|
||||
let pwNew = policyElement.value;
|
||||
let pwNewConfirmation = document.getElementById("register-password-confirmation").value;
|
||||
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew) === false) {
|
||||
if (ComplexityPolicyCheck(policyElement, pwNew, pwNewConfirmation) === false) {
|
||||
policyElement.setAttribute("color", "warn");
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user