🐛 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

@ -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 };

View file

@ -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>