feat: add wechat authentication

This commit is contained in:
xiong
2026-07-26 13:12:53 +08:00
parent 241b9f777e
commit 70e2503d18
15 changed files with 722 additions and 7 deletions

View File

@@ -74,6 +74,8 @@ Tiku.Infrastructure/Persistence/Migrations/20260725220742_InitialSchema.cs
- 本地认证不依赖 Supabase Auth
- 手机号 + 密码登录
- 短信验证码登录
- 微信网页 OAuth 登录
- 微信小程序 `wx.login` 登录
- JWT access token
- 数据库 `auth_sessions` refresh/session
- `auth_login_events` 登录事件
@@ -88,6 +90,8 @@ Tiku.Infrastructure/Persistence/Migrations/20260725220742_InitialSchema.cs
- 第一批认证/租户接口已经建立:
- `POST /api/auth/login/password`
- `POST /api/auth/login/sms`
- `POST /api/auth/oauth/wechat`
- `POST /api/auth/oauth/wechat-miniapp`
- `POST /api/auth/refresh`
- `POST /api/auth/logout`
- `GET /api/me`
@@ -122,6 +126,7 @@ Tiku.Infrastructure/Persistence/Migrations/20260725220742_InitialSchema.cs
- 无权限返回 403
- 密码登录成功/失败
- 短信验证码登录成功/失败
- 微信登录 upsert 用户、身份和租户成员
- 登录后访问当前用户和当前租户
- 登出后旧 access token / refresh token 被拒绝