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

4
.env
View File

@@ -1 +1,5 @@
VITE_API_BASE_URL = http://150.158.121.95
VITE_RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArq9XTUSeYr2+N1h3Afl/z8Dse/2yD0ZGrKwx+EEEcdsBLca9Ynmx3nIB5obmLlSfmskLpBo0UACBmB5rEjBp2Q2f3AG3Hjd4B+gNCG6BDaawuDlgANIhGnaTLrIqWrrcm4EMzJOnAOI1fgzJRsOOUEfaS318Eq9OVO3apEyCCt0lOQK6PuksduOjVxtltDav+guVAA068NrPYmRNabVKRNLJpL8w4D44sfth5RvZ3q9t+6RTArpEtc5sh5ChzvqPOzKGMXW83C95TxmXqpbK6olN4RevSfVjEAgCydH6HN6OhtOQEcnrU97r9H0iZOWwbw3pVrZiUkuRD1R56Wzs2wIDAQAB
-----END PUBLIC KEY-----"