Merge pull request #61 from wjzijderveld/password-length

Aligned password requirements and increased max-length to 64
This commit is contained in:
Mohamad Tarbin
2026-02-21 11:47:14 -05:00
committed by GitHub
4 changed files with 17 additions and 9 deletions

View File

@@ -70,7 +70,12 @@ const SignupView = () => {
}
if (password.length < 8) {
setPasswordError('Password must be at least 8 characters')
setPasswordError('Password must be between 8 and 64 characters')
isValid = false
}
if (password.length > 64) {
setPasswordError('Password must be between 8 and 64 characters')
isValid = false
}
@@ -218,6 +223,7 @@ const SignupView = () => {
label='Password'
type='password'
id='password'
placeholder='Enter password (8-64 characters)'
value={password}
onChange={e => {
setPasswordError(null)
@@ -237,6 +243,7 @@ const SignupView = () => {
name='displayName'
label='Display Name'
id='displayName'
placeholder='Confirm password'
value={displayName}
onChange={e => {
setDisplayNameError(null)

View File

@@ -31,8 +31,8 @@ const UpdatePasswordView = () => {
const handlePasswordChange = e => {
const password = e.target.value
setPassword(password)
if (password.length < 8) {
setPasswordError('Password must be at least 8 characters')
if (password.length < 8 || password.length > 64) {
setPasswordError('Password must be between 8 and 64 characters')
} else {
setPasswordError(null)
}

View File

@@ -40,9 +40,9 @@ function CreateChildUserModal({ isOpen, onClose, onSuccess }) {
if (!password) {
newErrors.password = 'Password is required'
} else if (password.length < 8) {
newErrors.password = 'Password must be at least 8 characters'
} else if (password.length > 45) {
newErrors.password = 'Password must be less than 45 characters'
newErrors.password = 'Password must be between 8 and 64 characters'
} else if (password.length > 64) {
newErrors.password = 'Password must be between 8 and 64 characters'
}
}
@@ -165,7 +165,7 @@ function CreateChildUserModal({ isOpen, onClose, onSuccess }) {
name='password'
type='password'
id='password'
placeholder='Enter password (8-45 characters)'
placeholder='Enter password (8-64 characters)'
value={password}
onChange={e => {
setPassword(e.target.value)

View File

@@ -25,8 +25,8 @@ function PassowrdChangeModal({ isOpen, onClose }) {
setPasswordError('Passwords do not match')
} else if (password.length < 8) {
setPasswordError('Password must be at least 8 characters')
} else if (password.length > 50) {
setPasswordError('Password must be less than 50 characters')
} else if (password.length > 64) {
setPasswordError('Password must be less than 64 characters')
} else {
setPasswordError(null)
}
@@ -63,6 +63,7 @@ function PassowrdChangeModal({ isOpen, onClose }) {
label='Password'
type='password'
id='password'
placeholder='Enter password (8-64 characters)'
value={password}
onChange={e => {
setPasswordTouched(true)