🐛 fix(auth): require name field in registration forms

Add required name field (min 2 chars) to all registration forms to fix
Better Auth validation error. Updates backend DTO, shared-auth service,
shared-auth-ui RegisterPage component, i18n translations, and all app
auth stores and register pages.
This commit is contained in:
Wuesteon 2025-12-16 20:28:28 +01:00
parent 11324b5e68
commit d3e11b320a
28 changed files with 151 additions and 56 deletions

View file

@ -103,14 +103,20 @@ export function createAuthService(config: AuthServiceConfig) {
},
/**
* Sign up with email and password
* Sign up with email, password, and name
* @param email User email
* @param password User password
* @param name User display name (min 2 characters)
* @param referralCode Optional referral code for bonus credits
*/
async signUp(email: string, password: string, referralCode?: string): Promise<AuthResult> {
async signUp(
email: string,
password: string,
name: string,
referralCode?: string
): Promise<AuthResult> {
try {
const body: Record<string, string> = { email, password };
const body: Record<string, string> = { email, password, name };
if (referralCode) {
body.referralCode = referralCode;
}