Existing-user invite flow shows registration form and fails with raw DB error on submit
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 57/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- typescript
- Domaine
- authentication, backend
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 4
- Forks
- 0
- Merge moyen
- 14 h 50 min
- PR mergées (30 j)
- 5
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Garvan-Data-Science-Platform/ctrl
-
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
-
admin-client backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 commentaire ·
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Toutes les issues de Garvan-Data-Science-Platform/ctrl
Issues similaires
-
useFragment does not require `variables` when the fragment's variables type has required fieldsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
apollographql/apollo-client#13493 ·
Les mainteneurs répondent en général sous 1 jour
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsPeut-être pris @roboomp l’a pris aujourd’hui. Ouvertebug prio:p2 providers triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
can1357/oh-my-pi#15798 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
code-yeongyu/oh-my-openagent#10172 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
PDFCraftTool/pdfcraft#189 ·
-
Add the Yahoo chart API duplicate last-day row (yfinance#573) to incidents.md (about 1 hour)Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertedata docs good first issue
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
pacocartones/market-data-sanity-checker#160 ·
Les mainteneurs répondent en général sous 1 jour