feat: [TESIS-135] let an operator ask for access from the browser - #57
Closed
TomasMartin2004 wants to merge 1 commit into
Closed
TomasMartin2004 wants to merge 1 commit into
TomasMartin2004 wants to merge 1 commit into
Conversation
TESIS-51 shipped the login half of its scope. The register screen was never built, so `POST /auth/register` — live since TESIS-26 — had no caller and the only way in was the backoffice or curl. Creating an account does not start a session: the account is born unapproved and someone enables it from the backoffice, exactly what the subtitle in S02-Registro says. So the screen ends on a message instead of redirecting. Two deviations from S02, both because the drawing predates the backend: - No "Usuario" field. `users` has no such column; identity is the email, and the endpoint takes `email` and `password` and nothing else. - The terms checkbox carries the text from the design but links nowhere, since the legal pages do not exist in the app yet. Same call AuthShell already made with the help center. The 202 is the same whether the account was created or the email already had one — the API does that on purpose so registering cannot be used to discover which emails exist. The success screen keeps that property: it never claims an account was created. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xAtddb53LRNVLuyTXyELp
TomasMartin2004
requested review from
LoLoo03
and removed request for
a team
September 28, 2026 01:29
Contributor
|
Queres que reabra este PR? |
Contributor
|
Lo corrijo, perdón que me colgué |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket de Jira
https://proyectofinalfrlp.atlassian.net/browse/TESIS-135
Descripción
TESIS-51 ("UI: Login y Registro") está cerrada, pero de su alcance sólo se implementó el login. La pantalla de registro no existía:
POST /api/v1/auth/registerestá en la API desde TESIS-26 y no lo llamaba nadie, así que darse de alta era por backoffice o por curl. Este PR la agrega.Crear la cuenta no inicia sesión. Nace sin aprobar y alguien la habilita desde el backoffice — es lo que dice la bajada del propio S02: «Solicitá acceso al espacio de operación de tu organización». Por eso la pantalla termina en un mensaje y no redirige al dashboard.
El 202 es el mismo se haya creado la cuenta o el email ya tuviera una. La API lo hace a propósito: si cambiara, registrarse serviría para averiguar qué emails existen. La pantalla de éxito conserva esa propiedad — nunca afirma que la cuenta se creó, dice «si el correo no tenía una cuenta…».
Dos desvíos de S02-Registro, los dos porque el dibujo es anterior al backend que existe hoy:
usersno tiene esa columna: la identidad es el email, y el endpoint aceptaemailypasswordy nada más. Un campo que no se guarda en ningún lado es peor que su ausencia.AuthShellcon el «Centro de ayuda». Los documentos existen como entregable E9, sin publicar.Como en el login, el encabezado de la tarjeta es el nombre del tenant y no el título del diseño: el branding por empresa (TESIS-121) es posterior a la pantalla dibujada.
/register, pública y sin shell, como/login.useRegister+registerErrorMessage, con el mismo criterio queloginErrorMessage: el 422 muestra el texto del servidor (es el que dice qué campo está mal), el 429 habla de minutos, el resto cae en el genérico.Evidencia visual
/registerno existía: el router redirigía a/y desde el login no había forma de llegar.AuthShell, con el branding del tenant, y pantalla de solicitud enviada al confirmar.Cómo probar
npm run dev, ir a/login: abajo del botón está «¿No tenés cuenta? Crear cuenta».admin@norte.comdel seed) → exactamente la misma pantalla. Esto es lo que hay que verificar: la UI no puede distinguirlos./admin(backoffice), aprobar la cuenta nueva y recién ahí se puede iniciar sesión con ella.Impacto y consideraciones
¿Introduce breaking changes?
No. Suma una ruta pública; nada existente cambia de comportamiento.
¿Requiere nuevas variables de entorno?
No.
¿Afecta la arquitectura o genera un nuevo patrón?
No. Feature
authexistente, mismos patrones (React Query para la mutación, RHF + Zod para el formulario, copy encontent.ts).Lo que sigue faltando de TESIS-51, y por qué no entra acá: el login con Google. La API no tiene OAuth —Devise está configurado sólo con JWT— así que es una card con backend propio, no una pantalla. Tampoco existen recuperación de contraseña ni "remember me" en la API.
🤖 Generated with Claude Code
https://claude.ai/code/session_012xAtddb53LRNVLuyTXyELp