Existing-user invite flow shows registration form and fails with raw DB error on submit
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- authentication, backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 0
- Merge medio
- 14 h 50 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Garvan-Data-Science-Platform/ctrl
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
-
admin-client backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Garvan-Data-Science-Platform/ctrl#970 · 1 comentario ·
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
backend bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Todos los issues de Garvan-Data-Science-Platform/ctrl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
xdjs/MusicNerdWeb#1532 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sebastian-software/ardo#352 ·
Los mantenedores suelen responder en 1 día
-
@react95/core good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 3 días
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the originalPosiblemente ocupada @xyrolle la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día