Signup form minimum password length aligned with backend (6 -> 8 characters)
The signup page in CaseMark's fork was enforcing a 6-character minimum while the backend required 8. A user who entered a 7-character password passed the frontend gate, hit `PASSWORD_TOO_SHORT` from Better Auth, and got a generic error with no explanation. This commit fixes both sides.
The fix is a single file change to frontend/src/app/signup/page.tsx. A MIN_PASSWORD_LENGTH = 8 constant replaces the three separate hardcoded 6 references, so the validation check, the error message, and the placeholder text all stay in sync from one place.
The catch block is also improved. The old code was a simple ternary: error instanceof Error ? error.message : "An error occurred during signup". The new signupErrorMessage() helper adds a second branch that checks for a duck-typed { message: string } shape. That matters here because Better Auth surfaces rejections as plain objects rather than Error instances in some paths - the PASSWORD_TOO_SHORT case being one of them - and the old guard would swallow those silently.
The author verified the fix by hitting the production API at api.mike.casemark.dev: a 6-character password returns PASSWORD_TOO_SHORT explicitly, an 8+ character password succeeds. Small fix, but the underlying problem (frontend and backend auth layers drifting apart and producing confusing signup failures) is easy to miss and annoying to diagnose.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?