CodeForPhilly / CodeForPhilly/codeforphilly-ng

auth.md: clarify status codes vs redirect for OAuth error modes

Đang mở Phù hợp với người mới
#42 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
1
Fork
1
Merge trung bình
5 ngày 3 giờ
Pull request đã merge (30 ngày)
9

Mô tả

The Errors section of [specs/api/auth.md](../specs/api/auth.md) lists \`oauth_state_mismatch\` and \`oauth_session_invalid\` as \`401 unauthenticated\` responses, while \`github_unreachable\` and \`email_unverified\` are documented as \`502\`/\`403\` *with* explicit redirect to \`/login?error=\`.

The github-oauth plan adopts the redirect strategy uniformly: every failure mode in the browser OAuth callback redirects to \`/login?error=\`. That matches [specs/screens/login.md](../specs/screens/login.md) which expects \`?error=\` rendering, and is what makes sense for a callback the browser hits directly.

Should the spec be updated to:
- list every OAuth error as 'redirect with \`?error=\`' (the actual user experience), and
- reserve the bare-status-code shape for non-browser callers (e.g., if the API ever exposes the same flow to a CLI client)?

Filed in the github-oauth closeout — non-blocking for that plan, but worth a small spec edit.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với phần Errors trong specs/api/auth.md, sau đó so sánh các chế độ lỗi OAuth của phần này với kế hoạch github-oauth và specs/screens/login.md. Cập nhật spec để các lỗi callback của trình duyệt nhất quán ghi lại các chuyển hướng với ?error=, đồng thời chỉ giữ lại các mã trạng thái thuần túy cho các trình gọi không phải trình duyệt nếu sự phân biệt đó được chỉ rõ trong đặc tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
authentication, documentation
Loại issue
Tài liệu
Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
82/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.