Existing-user invite flow shows registration form and fails with raw DB error on submit
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- authentication, backend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 0
- Merge medio
- 14h 50m
- PR unite (30g)
- 5
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Garvan-Data-Science-Platform/ctrl
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
-
admin-client backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 commento ·
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
backend bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Tutte le issue di Garvan-Data-Science-Platform/ctrl
Issue simili
-
afk-ok area:data-quality importer size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
enorm-labs/event-junkie#3301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
one-zero-eight/apply-bot#39 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bigbluebutton/bbb-ui-components-react#108 ·
I maintainer di solito rispondono entro 2 giorni
-
area: app type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ExpidetGames/code-reviewer#308 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno