# User Registration & Password Reset - UI Adaptations ## Overview This document describes the necessary UI changes and adaptations required in the Nyla frontend (`frontend_nyla`) to implement the magic link-based user authentication process described in `doc_userauth_process_concept.md`. **Last Updated**: Based on codebase analysis of current Nyla frontend implementation. **Frontend Stack**: React 19, TypeScript, Vite, React Router **Pattern**: Hooks-based architecture (`useAuthentication.ts`), component-based pages ## Current Frontend State ### Existing Pages 1. **`src/pages/Register.tsx`** - Contains registration form with: - Username field (with availability check) - Password field (required) - Confirm password field (required) - Email field - Full name field - Language selector (defaults to 'de') - Uses `useRegister()` hook from `useAuthentication.ts` - **Needs modification**: Remove password fields, add email-only registration 2. **`src/pages/Login.tsx`** - Contains login form with: - Username field - Password field - Microsoft authentication button - Google authentication button (placeholder) - Registration link - **Missing**: Password reset button/link 3. **`src/hooks/useAuthentication.ts`** - Contains `useRegister()` hook that sends password - Contains `useAuth()` hook for login - Contains `useUsernameAvailability()` hook - **Needs modification**: Update `useRegister()` to handle no-password registration - **Missing**: Password reset request and reset password hooks 4. **`src/api.ts`** - Axios instance with interceptors - Base URL from environment variables - **No changes needed** - existing API setup is sufficient ## Required UI Changes ### 1. Login Page (`src/pages/Login.tsx`) #### Changes Required: - Add "Password Reset" link/button below the login form - Link should navigate to `/password-reset-request` route - Style should match existing link styles (use `styles.textButton`) #### Implementation: ```tsx // Add after the disclaimer div, before the login button
Nach der Registrierung erhalten Sie eine E-Mail mit einem Link zum Setzen Ihres Passworts.
Bitte prüfen Sie auch Ihren Spam-Ordner, falls Sie keine E-Mail erhalten.