Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Flujo de forgot password #87

Merged
merged 11 commits into from
Sep 25, 2024
Merged

Conversation

aaron-diaz
Copy link
Contributor

@aaron-diaz aaron-diaz commented Sep 19, 2024

#45

Agregue dos paginas:
Una para donde el usuario pone su correo para que se le envie el enlace (/forgot-password).
Otra en donde el usuario va para cambiar su contrasena (/change-password?token={token}).
Tambien agregue dos funciones: una que genera el token y se lo manda al correo del usuario, y otra que hace el cambio de la contrasena si el token es valido y corresponde a un usuario existente.
Por supuesto, tambien agregue dos templates de correo: uno en el que se le avisa que se hizo un intento de cambio de contrasena y otro donde se avisa que el cambio de contrasena fue exitoso.
Solo me falta hacer los endpoints de la API como tal. Tengo unas dudas al respecto.

@aaron-diaz aaron-diaz marked this pull request as draft September 19, 2024 05:53
src/lib/emailer/template.ts Outdated Show resolved Hide resolved
src/lib/emailer/template.ts Outdated Show resolved Hide resolved
src/lib/emailer/template.ts Outdated Show resolved Hide resolved
src/types/auth.schema.ts Outdated Show resolved Hide resolved
src/pages/forgot-password.tsx Outdated Show resolved Hide resolved
src/pages/api/user/reset-password.tsx Outdated Show resolved Hide resolved
src/pages/api/user/change-password.tsx Outdated Show resolved Hide resolved
src/pages/api/user/change-password.tsx Outdated Show resolved Hide resolved
src/pages/api/user/change-password.tsx Outdated Show resolved Hide resolved
src/pages/api/user/reset-password.tsx Outdated Show resolved Hide resolved
@aaron-diaz
Copy link
Contributor Author

Listo. Ya hice los cambios :)

@aaron-diaz aaron-diaz marked this pull request as ready for review September 21, 2024 05:56
@Juanito98 Juanito98 merged commit 1b62ddd into main Sep 25, 2024
1 check passed
@Juanito98 Juanito98 deleted the feat/forgot-password-flow branch September 25, 2024 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants