The sign-in redirect URL is built by hand in five places
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- next.js, typescript
- Lĩnh vực
- authentication, backend-api-design
Hướng nghiên cứu
Read src/auth/callback-url.ts and the five call sites named in the issue, then check the three listed e2e specs and the existing test setup. Add and test the shared URL helper, replace the five literals, and run the listed lint, format, typecheck, knip, and test commands. Done means no hand-built /login?callbackUrl= remains in src and the e2e specs pass unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
Five places write the same template literal, /login?callbackUrl=${encodeURIComponent(x)}, with no shared helper:
requireOrganizerSessioninsrc/auth/session.ts- the consent page
src/app/oauth/consent/[uid]/page.tsx, twice: the signed-out redirect andswitchAccount src/app/oauth/consent/[uid]/decision/route.tsswitchAccountinsrc/components/signup/SignupLoadError.tsx
The two "Sign in as someone else" actions also each explain the same reason in their own words: plain /login would bounce a signed-in organizer straight back to /app, so they sign out first. src/auth/callback-url.ts already owns the callback rules and is the natural home for the URL. Nobody using OpenSignup would notice a fix.
Fix, in outline
- Add
loginUrl(callbackUrl: string)tosrc/auth/callback-url.ts. It builds the URL and nothing else: don't callsafeCallbackUrlinside it. The callers already do that where it's needed, and the consent paths are pre-validated. - Optionally, add
switchOrganizer(callbackUrl)insrc/auth/sign-out.ts, which callssignOutOrganizer(loginUrl(callbackUrl))and carries the shared "why sign out first" comment once. EachswitchAccountkeeps only its site-specific note. - Replace the five literals.
redirect()andsignOutOrganizer()calls stay where they are.
Watch for
- This touches
src/authand the OAuth consent pages, so the PR waits for the owner even though output is byte-identical. A scratch test showed the helper matches all five current expressions for every input tried: paths with queries, unicode, already-encoded input, and 128-character consent uids. - The e2e specs that assert the URL (
tests/e2e/organizer.spec.ts,login-code.spec.ts,oauth-consent.spec.ts) must pass unchanged. - The net line count is about zero; the gain is one owner for the URL shape.
Done when
- No hand-built
/login?callbackUrl=string is left insrc. - A unit test pins
loginUrl. pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm testpass.
Found by the pipeline's refactor scout in sign-in and OAuth (src/auth, src/app/oauth), at c1e1cad. Checked by an independent verify agent, which grepped every callbackUrl= and /login in src and tests and ran a scratch vitest comparing a shared helper with each copy. https://claude.ai/code/session_016YZ9ST4ox4Tmm6UZcobKgf
Held back by the scout's cap. Add pipeline:ready to queue it.
- Ngôn ngữ chính
- TypeScript
- Star
- 19
- Fork
- 4
- Merge trung bình
- 19 giờ 15 phút
- Pull request đã merge (30 ngày)
- 205
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của richshaw/OpenSignup
-
The sign-up dialog's "See alternatives" link looks out of place, and is too small to tap on a phoneĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
richshaw/OpenSignup#810 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
richshaw/OpenSignup#794 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement pipeline:proposed pipeline:ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
richshaw/OpenSignup#654 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The sign-up dialog decides "See alternatives" with its own copy of the rule behind "Pick another slot."Có thể đã có người làm @dafeiyupola đã nhận 1 ngày trước. Đang mởenhancement good first issue pipeline:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
richshaw/OpenSignup#803 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A failed database query logs its parameters, so OAuth tokens and participant details can end up in the logsCó thể đã có người làm @richshaw đã nhận 2 ngày trước. Đang mởbug pipeline:building
richshaw/OpenSignup#800 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của richshaw/OpenSignup
Issue tương tự
-
desktop v3 windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
esengine/DeepSeek-Reasonix#15016 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FR: Support CJK brackets, symbols and full-width markers in footnoteHeuristics (EBPAJ support)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
readest/readest#7413 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue priority: medium size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
content triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eliasstravik/herdr-projects#788 ·