Commit Graph

3 Commits

Author SHA1 Message Date
王性驊 b754a2d07d 修正 dev 登入與管理後台:ZITADEL Sessions 驗密、bootstrap admin、角色指派 UX。
ZITADEL v2 不支援 password grant,改優先走 Sessions API 以恢復 Email 登入;
dev-up 自動 seed 權限與 admin@k6.local,並改善使用者角色頁在無角色時仍可指派。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 14:45:11 +08:00
王性驊 ffd60206d0 add fix eage case 2026-05-26 17:32:32 +08:00
王性驊 713a81f70b feat(auth): add unified registration/login module with Zitadel + lint cleanup
- Introduce auth module: handlers, logic, domain/repository/usecase, JWT
  middleware, and Zitadel OIDC client (password + authorization code +
  userinfo + JWKS verification)
- Wire member rate-limit, structured errors, and refactored member/
  notification usecases (introduce shared errors, drop repo_errors.go)
- Bring the codebase to zero golangci-lint issues:
  * goimports formatting
  * errcheck on io.ReadAll/Unlock cleanup paths
  * contextcheck: HandlerContext now takes (ctx, *http.Request)
  * gocritic: rename shadowed `max`, use http.NoBody
  * goconst: extract test fixtures and bsonOpSet
  * testifylint: switch to assert inside httptest handlers

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 14:45:35 +08:00