Merge branch 'dev' into hugo-shipping-notice
This commit is contained in:
commit
bc86720744
49 files changed
+2950
-458
No files matched your search
+25
@@ -767,6 +767,31 @@ const update = () => { isMobile.value = window.innerHeight > window.innerWidth;
|
||||
- 路由守卫对 `/workspace` 等直接访问不做拦截,PC 端行为不变
|
||||
- PC 端侧边栏、导航栏、布局结构无任何 CSS 或 DOM 变更
|
||||
|
||||
### 16.6 登录页“记住我”方案补充
|
||||
|
||||
- **产品口径**:按当前业务确认,登录页采用“记住我(记住登录状态 + 记住账号密码)”方案;用户勾选后,回到登录页时应自动回填账号和密码,允许直接点击【登录】进入系统。
|
||||
- **现有基础**:前端认证工具 `shared/utils/auth.ts` 已支持:
|
||||
- 勾选时将登录态持久化到 `localStorage`
|
||||
- 未勾选时仅保存在 `sessionStorage`
|
||||
- `hxops_user` 本地持久化有效期 30 天
|
||||
- 登录页现已补齐“记住我”勾选框、remembered username/password 回填与浏览器密码自动填充兼容属性
|
||||
- **推荐交互**:
|
||||
- 勾选“记住我”并登录成功后:持久化登录态,并额外记住用户名和密码
|
||||
- 下次进入登录页时:若登录态仍有效,则直接进入系统;若用户因登出或登录态失效回到登录页,则自动回填账号和密码
|
||||
- 用户取消勾选后:清除 remembered username/password、remember flag 与本地持久登录态
|
||||
- **本地存储建议**:
|
||||
- 认证数据继续沿用现有 `hxops_user`
|
||||
- 登录页偏好建议独立存储,如 `hxops_login_remember`、`hxops_login_profile`
|
||||
- `hxops_login_profile` 保存 `username`、本地可恢复的 `password_ciphertext` 与更新时间,用于登录页自动回填
|
||||
- **浏览器密码兼容**:
|
||||
- 用户名输入框补 `autocomplete="username"`
|
||||
- 密码输入框补 `autocomplete="current-password"`
|
||||
- 浏览器若支持密码管理器,可继续辅助自动填充;当前主能力仍以前端 remember 存储为准
|
||||
- **实现边界**:
|
||||
- 本方案不新增后端接口,仍复用现有密码登录与 refresh token 机制
|
||||
- remembered password 仅用于登录页自动回填,不参与后端持久化
|
||||
- 用户取消勾选后,必须同步清理本地 remembered password,避免后续误填
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user