Auth: migrate OAuth routes from /rest/v1/login to /rest/v1/auth/*
维护者通常 1 天内回复
@skypank-coder 已经在做这个了。
开始于 2026年7月9日。
评估
这个 Issue 还没有评估数据。
描述
Context
RFC merged in #876 (docs/rfc/user-auth-myopencre.md) proposes new auth routes at /auth/login, /auth/callback, /auth/logout. Existing Google OAuth already lives at:
GET /rest/v1/loginGET /rest/v1/callbackGET /rest/v1/logoutGET /rest/v1/user
Per maintainer review of #876, consolidate under the versioned API namespace:
Target routes:
GET /rest/v1/auth/loginGET /rest/v1/auth/callbackGET /rest/v1/auth/logoutGET /rest/v1/auth/user(or keep/rest/v1/user— decide during implementation)
Requirements
- Add
/rest/v1/auth/*routes implementing the RFC TODO 1 session contract (session['user_id'], redirect on missing session) - Keep
/rest/v1/login,/rest/v1/callback,/rest/v1/logoutas temporary aliases with deprecation headers or redirect to/rest/v1/auth/* - Update frontend (
useUser, Header) and any docs referencing old paths - Update
login_requiredto redirect to/rest/v1/auth/login?next=<url>(not 401 for browser flows) - Consider separate behavior for API clients (
Accept: application/json→ 401 vs browser → 302)
Related
- RFC:
docs/rfc/user-auth-myopencre.mdTODO 1 - #586 (MyOpenCRE online)
- #943 (frontend auth UX)
- #949 (capabilities API)
Acceptance criteria
- New routes work end-to-end with Google OAuth
- Old routes redirect or alias without breaking existing bookmarks
- Tests cover both old aliases and new canonical paths during migration window
- 主要语言
- Python
- 星标
- 210
- 派生
- 167
- 平均合并
- 4 天 12 小时
- 30 天内合并 PR
- 28
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OWASP/OpenCRE 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Map Analysis continues polling after a background job fails可能已有人在做 @amantebriwal4321 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100
维护者通常 1 天内回复
-
MCP tools return "Internal MCP tool error." when OpenCRE is unreachable or times out可能已有人在做 @ShaanGS 于 23 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
find_node_by_name endpoint does not enforce MAX_ITEMS_PER_PAGE, allowing unbounded pagination queries`可能已有人在做 @Jeffy123-zhu 于 26 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
Unknown stop ID in slow zone data crashes post formatting and skips the rest of that day's posts未关闭backend bug tm-new-volunteer
难度 2/5 1-3 小时 新手友好度 84/100
transitmatters/mbta-slow-zone-bot#81 · 1 条评论 ·
-
area:schema documentation
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
risk:high type:ci
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
spacetelescope/rdmt-spire#49 ·
维护者通常 1 天内回复