Existing-user invite flow shows registration form and fails with raw DB error on submit
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Start with application/backend/src/controllers/ParticipantsController.ts and the sendInvite email-sending flow; compare the existing-user path with the registration email path. Check how GET /invites/pending, POST /invites/{inviteId}/accept, and StudyInvites.tsx support existing users. Done means existing users receive a login-and-accept invitation email, while new users retain the registration link.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When a user who already has a CTRL account is invited to a new study, the current flow is rough:
- Not logged in, clicking the invite link opens the full registration form. Filling everything in and submitting fails with
Error Registering: emailHash already in use. That raw DB-ish message comes fromapplication/backend/src/middlewares/ErrorHandler.tsusing the Prisma unique constraint column name as-is, and shouldn't be exposed to end users. Having users fill the entire form only to fail on submit is bad UX too. - Logged in as the invited user, clicking the same invite link still shows the registration form. Would expect them to just see and accept the invite from their dashboard (that flow already exists via
GET /invites/pending+StudyInvites.tsx). - The registration form doesn't pre-fill the email from the invite. Users could type a slightly different email and only find out on submit that it doesn't match the invite.
Suggested fix
The accept-invite flow for existing users already works in the dashboard (GET /invites/pending + POST /invites/{inviteId}/accept + StudyInvites.tsx). Simplest fix would be at the email-sending step in sendInvite (application/backend/src/controllers/ParticipantsController.ts):
- If a user with the recipient's email already exists: send a "you've been invited to , please log in to accept in your dashboard" email with a login link
- If not: send the current registration email with the /register/{inviteId} link
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 0
- Merge trung bình
- 14 giờ 50 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 Garvan-Data-Science-Platform/ctrl
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
-
admin-client backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 bình luận ·
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tất cả issue của Garvan-Data-Science-Platform/ctrl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
high priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 bình luận ·
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated messageCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
joinmarket-webui/jam#1538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t0ggles
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nolimits4web/swiper#8240 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày