feat(portal): agregar flujo de recuperación de contraseña
- Nuevo modelo PortalPasswordResetToken con token seguro (32 bytes, 1h vigencia) - AutoMigrate del nuevo modelo en main.go - SendPortalPasswordResetEmail con diseño consistente al app - Handlers: PortalForgotPasswordPage/Post y PortalResetPasswordPost/Page - Rutas públicas GET/POST /portal/forgot-password y /portal/reset-password - Vistas forgot_password.html y reset_password.html con validación JS - Enlace ¿Olvidaste tu contraseña? en login.html + soporte mensaje success Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
b5e6a9285f
commit
6e27032ac6
@@ -12,6 +12,12 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .success }}
|
||||
<div class="bg-green-50 border border-green-200 text-green-700 rounded-xl px-4 py-3 mb-4 text-sm">
|
||||
{{ .success }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="bg-white rounded-2xl shadow-lg border border-slate-200 p-8">
|
||||
<form method="POST" action="/portal/login">
|
||||
<div class="space-y-4">
|
||||
@@ -35,6 +41,11 @@
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="text-center mt-4">
|
||||
<a href="/portal/forgot-password" class="text-xs text-slate-400 hover:text-[#8eb02f] transition-colors">
|
||||
¿Olvidaste tu contraseña?
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-center text-xs text-slate-400 mt-6">
|
||||
|
||||
Reference in New Issue
Block a user