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

@@ -3,8 +3,10 @@ import { CssBaseline, ThemeProvider } from '@mui/material';
import { theme } from './theme';
import AppRoutes from './routes';
import SnackbarProvider from './components/Provider/SnackbarProvider';
import AuthGuard from './components/AuthGuard';
import './locales';
import './utils/request'
/**
* 封装MaterialUIApp将主题、基础样式和路由包裹起来
@@ -15,7 +17,9 @@ function MaterialUIApp() {
<CssBaseline />
<SnackbarProvider>
<BrowserRouter>
<AppRoutes />
<AuthGuard>
<AppRoutes />
</AuthGuard>
</BrowserRouter>
</SnackbarProvider>
</ThemeProvider>