mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-21 02:06:41 +02:00
🐛 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:
parent
11324b5e68
commit
d3e11b320a
28 changed files with 151 additions and 56 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue