mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +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
|
|
@ -131,16 +131,16 @@ export const authStore = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Sign up with email and password
|
||||
* Sign up with email, password, and name
|
||||
*/
|
||||
async signUp(email: string, password: string) {
|
||||
async signUp(email: string, password: string, name: string) {
|
||||
const authService = getAuthService();
|
||||
if (!authService) {
|
||||
return { success: false, error: 'Auth not available on server', needsVerification: false };
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await authService.signUp(email, password);
|
||||
const result = await authService.signUp(email, password, name);
|
||||
|
||||
if (!result.success) {
|
||||
return { success: false, error: result.error || 'Signup failed', needsVerification: false };
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
const translations = $derived(getRegisterTranslations($locale || 'de'));
|
||||
|
||||
async function handleSignUp(email: string, password: string) {
|
||||
return authStore.signUp(email, password);
|
||||
async function handleSignUp(email: string, password: string, name: string) {
|
||||
return authStore.signUp(email, password, name);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue