Auth: migrate OAuth routes from /rest/v1/login to /rest/v1/auth/*
Open
@skypank-coder is already working on this.
Since Jul 9, 2026.
- Dominant language
- Python
- Stars
- 180
- Forks
- 137
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 21
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.