Fix authentication state persistence and admin role display
- Implement complete authentication system with JWT token validation - Add auth provider with persistent login state across page refreshes - Create multilingual login/register forms with Material-UI components - Fix token validation using raw SQL queries to bypass Prisma sync issues - Add comprehensive error handling for expired/invalid tokens - Create profile and settings pages with full i18n support - Add proper user role management (admin/user) with database sync - Implement secure middleware with CSRF protection and auth checks - Add debug endpoints for troubleshooting authentication issues - Fix Zustand store persistence for authentication state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -195,6 +195,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"confirmPassword": "Confirm password",
|
||||
"name": "Name",
|
||||
"optional": "(optional)",
|
||||
"login": "Login",
|
||||
"register": "Register",
|
||||
"logout": "Logout",
|
||||
"logging_in": "Logging in...",
|
||||
"registering": "Registering...",
|
||||
"loginError": "Login error",
|
||||
"registerError": "Registration error",
|
||||
"connectionError": "Connection error",
|
||||
"passwordMismatch": "Passwords don't match",
|
||||
"createAccount": "Create account",
|
||||
"alreadyHaveAccount": "Already have an account?",
|
||||
"noAccount": "Don't have an account?",
|
||||
"forgotPassword": "Forgot password?",
|
||||
"welcomeBack": "Welcome back!",
|
||||
"joinUs": "Join us!"
|
||||
},
|
||||
"profile": {
|
||||
"title": "Profile",
|
||||
"subtitle": "Manage your account information",
|
||||
"personalInfo": "Personal Information",
|
||||
"accountDetails": "Account Details",
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"role": "Role",
|
||||
"memberSince": "Member Since",
|
||||
"edit": "Edit",
|
||||
"save": "Save Changes",
|
||||
"saving": "Saving...",
|
||||
"cancel": "Cancel",
|
||||
"emailCannotChange": "Email cannot be changed",
|
||||
"profileUpdated": "Profile updated successfully!",
|
||||
"updateError": "Error updating profile",
|
||||
"user": "User",
|
||||
"admin": "Administrator",
|
||||
"moderator": "Moderator"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"subtitle": "Customize your experience",
|
||||
"appearance": "Appearance",
|
||||
"languageAndNotifications": "Language & Notifications",
|
||||
"security": "Security",
|
||||
"theme": "Theme",
|
||||
"fontSize": "Font Size",
|
||||
"language": "Language",
|
||||
"notifications": "Enable notifications",
|
||||
"emailUpdates": "Email updates",
|
||||
"changePassword": "Change Password",
|
||||
"changePasswordSoon": "Change Password (Coming Soon)",
|
||||
"passwordSecurity": "Password and security settings",
|
||||
"saveSettings": "Save Settings",
|
||||
"settingsSaved": "Settings saved successfully!",
|
||||
"settingsError": "Error saving settings",
|
||||
"themes": {
|
||||
"light": "Light",
|
||||
"dark": "Dark",
|
||||
"auto": "Auto"
|
||||
},
|
||||
"fontSizes": {
|
||||
"small": "Small",
|
||||
"medium": "Medium",
|
||||
"large": "Large"
|
||||
},
|
||||
"languages": {
|
||||
"ro": "Română",
|
||||
"en": "English"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"loading": "Loading...",
|
||||
"error": "An error occurred",
|
||||
|
||||
@@ -195,6 +195,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"email": "Email",
|
||||
"password": "Parolă",
|
||||
"confirmPassword": "Confirmă parola",
|
||||
"name": "Nume",
|
||||
"optional": "(opțional)",
|
||||
"login": "Autentificare",
|
||||
"register": "Înregistrare",
|
||||
"logout": "Deconectare",
|
||||
"logging_in": "Se autentifică...",
|
||||
"registering": "Se înregistrează...",
|
||||
"loginError": "Eroare la autentificare",
|
||||
"registerError": "Eroare la înregistrare",
|
||||
"connectionError": "Eroare de conexiune",
|
||||
"passwordMismatch": "Parolele nu se potrivesc",
|
||||
"createAccount": "Creează cont",
|
||||
"alreadyHaveAccount": "Ai deja cont?",
|
||||
"noAccount": "Nu ai cont?",
|
||||
"forgotPassword": "Ai uitat parola?",
|
||||
"welcomeBack": "Bine ai revenit!",
|
||||
"joinUs": "Alătură-te nouă!"
|
||||
},
|
||||
"profile": {
|
||||
"title": "Profil",
|
||||
"subtitle": "Gestionează informațiile contului tău",
|
||||
"personalInfo": "Informații personale",
|
||||
"accountDetails": "Detalii cont",
|
||||
"name": "Nume",
|
||||
"email": "Email",
|
||||
"role": "Rol",
|
||||
"memberSince": "Membru din",
|
||||
"edit": "Editează",
|
||||
"save": "Salvează modificările",
|
||||
"saving": "Se salvează...",
|
||||
"cancel": "Anulează",
|
||||
"emailCannotChange": "Email-ul nu poate fi schimbat",
|
||||
"profileUpdated": "Profilul a fost actualizat cu succes!",
|
||||
"updateError": "Eroare la actualizarea profilului",
|
||||
"user": "Utilizator",
|
||||
"admin": "Administrator",
|
||||
"moderator": "Moderator"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Setări",
|
||||
"subtitle": "Personalizează experiența ta",
|
||||
"appearance": "Aspect",
|
||||
"languageAndNotifications": "Limba și notificări",
|
||||
"security": "Securitate",
|
||||
"theme": "Temă",
|
||||
"fontSize": "Mărimea fontului",
|
||||
"language": "Limba",
|
||||
"notifications": "Activează notificările",
|
||||
"emailUpdates": "Actualizări prin email",
|
||||
"changePassword": "Schimbă parola",
|
||||
"changePasswordSoon": "Schimbă parola (În curând)",
|
||||
"passwordSecurity": "Setări parolă și securitate",
|
||||
"saveSettings": "Salvează setările",
|
||||
"settingsSaved": "Setările au fost salvate cu succes!",
|
||||
"settingsError": "Eroare la salvarea setărilor",
|
||||
"themes": {
|
||||
"light": "Luminos",
|
||||
"dark": "Întunecat",
|
||||
"auto": "Automat"
|
||||
},
|
||||
"fontSizes": {
|
||||
"small": "Mic",
|
||||
"medium": "Mediu",
|
||||
"large": "Mare"
|
||||
},
|
||||
"languages": {
|
||||
"ro": "Română",
|
||||
"en": "English"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"loading": "Se încarcă...",
|
||||
"error": "A apărut o eroare",
|
||||
|
||||
Reference in New Issue
Block a user