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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user