feat(auth): implement user authentication and email verification

Add registration, login, and logout flows with session management
Integrate Resend for email verification tokens
Create frontend auth views and update topbar state
This commit is contained in:
2026-04-30 11:32:46 +08:00
parent 193b4e3fd5
commit 9af8c98401
13 changed files with 898 additions and 11 deletions

View File

@@ -113,4 +113,19 @@ Eg: 名称:乱撒,二级分类:棉花
- 材料单详情页
- 基本信息
- 入手方式
- 需要材料列表
- 需要材料列表
## 用户系统
- 用户可注册
- 邮箱
- 显示名
- 密码
- 用户注册后需要通过邮箱验证
- 使用 Resend 发送验证邮件
- 邮件内包含验证链接
- 用户可登录
- 仅允许已验证邮箱的用户登录
- 登录后可获取当前用户信息
- 用户可退出登录
- API 只返回必要用户字段,不暴露密码、验证 token、会话 token 哈希或内部元数据