Repository navigation
fix(auth): drop password length rule from sign-in form - #169
Open
devs-rootstrap wants to merge 1 commit into
Open
devs-rootstrap wants to merge 1 commit into
devs-rootstrap wants to merge 1 commit into
Conversation
devs-rootstrap
requested review from
amaury901130,
asdolo and
fernandatoledo
and
a balanced review from Copilot
November 10, 2026 12:06
💯 Test Coverage
😎 Tests Results
👀 Tests Details • (56%)
|
There was a problem hiding this comment.
🟡 Changes recommended
The review still lists an active nit in src/components/login-form.tsx at line 18.
1 open issue
No actionable findings · New
What changed in this PR
Overall Review: ai:clean
Removes password-length validation from sign-in so existing credentials are not blocked by client-side password-creation rules. No actionable issues identified.
Changes:
- Accepts any non-empty sign-in password while preserving required-field validation.
- Removes the unused length-error translation and updates the form examples.
- Adds regression tests for short passwords and cleared password fields.
| File | Description |
|---|---|
src/translations/en.json |
Removes the unused sign-in password-length message. |
src/components/login-form.tsx |
Replaces the six-character minimum with a non-empty check. |
docs/src/content/docs/ui-and-theme/Forms.mdx |
Aligns both form examples with non-empty password validation. |
__tests__/components/login-form.test.tsx |
Tests short-password submission and required errors after clearing. |
Review effort: Balanced
| password: string({ | ||
| required_error: translate('auth.signIn.validation.passwordRequired'), | ||
| }).min(MIN_CHARS, translate('auth.signIn.validation.passwordMinChars')), | ||
| }).min(1, translate('auth.signIn.validation.passwordRequired')), |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Jira board reference:
What does this do?
Removes the minimum password length rule from the sign-in form (
src/components/login-form.tsx). The sign-in form now only checks that a password was entered:MIN_CHARSconstant and the.min(MIN_CHARS, ...passwordMinChars)rule..min(1, translate('auth.signIn.validation.passwordRequired')), so an empty string shows the same "Password is required" error as a missing value.auth.signIn.validation.passwordMinCharskey fromsrc/translations/en.json. Nothing else used it, anden.jsonis the only translation file.docs/src/content/docs/ui-and-theme/Forms.mdxto usez.string().min(1)instead ofmin(6).__tests__/components/login-form.test.tsx: a short password (123) submits without a length error, and clearing the password still shows the required error.The sign-up form (
src/components/sign-up-form.tsx) is unchanged. It already checks password length (MIN_PASSWORD_LENGTH = 6, errorauth.signUp.error.shortPassword) and that the password confirmation matches.Why did you do this?
Password strength and length rules belong where a password is created (sign-up), not where it is checked (sign-in). Checking length on sign-in adds nothing: the backend decides whether the credentials are valid. It can also block users whose passwords were set under different rules, or by another client.
Who/what does this impact?
auth.signIn.validation.passwordMinCharswill need to drop that reference. Nothing in this repo still uses it.Layer 2: Risk Classification
Author applies a risk label when opening the PR. When in doubt, escalate.
risk:lowrisk:mediumrisk:highSetup
risk:low,risk:medium,risk:highlabels in the repoHow did you test this?
Verification
pnpm lint: passedpnpm type-check: passedpnpm lint:translations: passedpnpm test: passed (28 suites, 141 tests), including__tests__/components/login-form.test.tsxand__tests__/components/sign-up-form.test.tsxHow to test locally
pnpm installpnpm test -- __tests__/components/login-form.test.tsx __tests__/components/sign-up-form.test.tsxpnpm start, then open on iOS, Android or web):123, then tap Login. No length error should appear, and the form should submit.Notes:
Assumptions:
auth.signIn.validation.passwordMinCharstranslation key was removed because nothing uses it anymore.src/app/update-password.tsx) has its own minimum length rule for new passwords. It is out of scope and was not changed.Screenshots / Previews
No UI layout changes. The only visible difference is that the length error no longer appears on the sign-in form.