9 Commits

Author SHA1 Message Date
wangdl
b9e6055400 fix: H0-01 彻底阻断生产环境 mock + 结构化错误码 + iOS Auth 合同文档
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 41s
- apple-auth.service.ts: verifyIdentityToken 增加 NODE_ENV 检查,
  生产环境缺 APPLE_BUNDLE_ID 时运行时返回 401,不再走 mock
- 新增 CAPIErrorCode 语义错误码体系 (src/common/errors/)
- 新增 CapiException 携带 errorCode 的 HttpException 子类
- GlobalExceptionFilter 响应自动包含 errorCode 字段
- AuthService/JwtAuthGuard/AppleAuthService 全部改用 CapiException
- 新增 LoginResponseDto/RefreshResponseDto/LogoutResponseDto/UserDto
- Auth controller Swagger 添加 type 参数
- 新增 docs/ios-auth-api-contract.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 21:03:15 +08:00
007b56dad5 feat: AI三层架构 + 全局JwtAuthGuard + 12个Repository迁Prisma
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 1m0s
- AI: 新三层架构 Provider→Gateway→Workflow(15文件,DeepSeek+MiniMax)
- Auth: 全局JwtAuthGuard + @Public()装饰器白名单路由
- DB: 12个Repository从Map/Array迁到Prisma
- Schema: 新增AiUsageLog、WaitlistEntry模型
- API: /api-docs-json加Basic Auth保护
- 清理: 删除infrastructure/ai、docs/旧文档

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 00:39:46 +08:00
fa69749884 refactor(auth): restructure auth system, align with iOS login flow spec
- Split AuthService into AppleAuthService, TokenService, AuthService
- Add dev-login endpoint (dev-only, disabled in production)
- AppleLoginDto: authorizationCode optional, add userIdentifier/email/fullName/nonce
- Login/refresh responses now include user object
- logout: single-token revoke + JwtAuthGuard protection
- users.repository: switch from in-memory Map to Prisma persistence
- JWT payload includes role, guards attach full user info to request
- Dual JWT secret support (JWT_ACCESS_SECRET / JWT_REFRESH_SECRET)
- Replace jwks-rsa+jsonwebtoken with jose library
- Prisma User model: add role field
- Independent DTO files with @Transform for empty string safety
- Add 5 iOS login flow documentation files
2026-05-13 17:31:50 +08:00
387785bd1e ci: deploy workflow 加 Apple 登录环境变量
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 19s
2026-05-13 15:54:59 +08:00
a16871fdc5 chore: 再次排除敏感文件
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 19s
2026-05-09 21:08:55 +08:00
8ba754daad ci: 改用 host 模式 runner + 纯 shell workflow
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 2m1s
2026-05-09 21:05:03 +08:00
9a4041109e chore: 从远程仓库删除 credentials.md 和 AI回答.md,加入 .gitignore
Some checks are pending
Deploy API Server / build-and-deploy (push) Waiting to run
2026-05-09 20:47:16 +08:00
4435e4a8ab docs: 补移 AI回答.md 到 docs/
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
2026-05-09 20:33:33 +08:00
3e653dc1af docs: 整理文档到 docs/ 文件夹 + 新增 credentials.md 凭据汇总
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
2026-05-09 20:31:23 +08:00