feat(auth): implement secure authentication flow with RSA encryption

- Add jsencrypt and js-base64 dependencies for RSA encryption
- Create AuthGuard component for route protection
- Implement encryption utility for password security
- Refactor login page with tabbed interface and form validation
- Add login hooks for authentication state management
- Update user service to handle encrypted passwords
This commit is contained in:
2025-10-10 18:25:20 +08:00
parent a1282de74f
commit d6ff547f20
10 changed files with 697 additions and 119 deletions

View File

@@ -14,7 +14,7 @@ const userService = {
},
// 用户注册
register: (data: { email: string; password: string; username?: string }) => {
register: (data: { email: string; password: string; nickname?: string }) => {
return post(api.register, data);
},