long-agent
4acd19f420
fix: P0-07 prevent login bypassing TOTP verification
...
- Add RequiresTOTP, TempToken, UserID fields to LoginResponse
- Add isTOTPRequiredForLogin() to check if TOTP is needed after password
- Add VerifyTOTPAfterPasswordLogin() for completing login with TOTP
- Login() now checks if TOTP is required after password verification
When user has TOTP enabled and device is not trusted:
- Login returns {requires_totp: true, user_id: <id>} instead of token
- Frontend should prompt for TOTP code
- Frontend calls VerifyTOTPAfterPasswordLogin to complete login
Note: Frontend changes are required to handle the new login flow.
The TempToken field is reserved for future use.
2026-04-18 14:19:15 +08:00
..
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-12 16:15:32 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-08 22:50:42 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-18 14:19:15 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-09 15:30:26 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-09 15:30:26 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-12 16:15:32 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-12 16:15:32 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-07 12:08:16 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-18 10:26:36 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-09 15:30:26 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-07 12:08:16 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-12 16:15:32 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00