prompt 6
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
Implementa AUTH completo (server-rendered) e templates in /web/templates/public.
|
||||
|
||||
Routes:
|
||||
- GET/POST /signup
|
||||
- GET/POST /login
|
||||
- POST /logout
|
||||
- GET /verify-email?token=...
|
||||
- GET/POST /forgot-password
|
||||
- GET/POST /reset-password?token=...
|
||||
|
||||
Comportamento:
|
||||
- Signup crea user (role=user, verified=false), genera verify token (hash in DB), invia email (mailer).
|
||||
- Login: blocca se email non verificata.
|
||||
- Verify-email: valida token, set EmailVerified=true, elimina token.
|
||||
- Forgot-password: risposta sempre generica; se user esiste+verified, genera reset token e invia email.
|
||||
- Reset-password: valida token, aggiorna password, elimina token.
|
||||
|
||||
Crea templates:
|
||||
- public/login.html
|
||||
- public/signup.html
|
||||
- public/forgot_password.html
|
||||
- public/reset_password.html
|
||||
- public/verify_notice.html
|
||||
- public/home.html (opzionale)
|
||||
Aggiungi partial per flash (public/_flash.html) e includilo nel layout.
|
||||
|
||||
Usa repo/service per accesso DB e logica (non tutto nel controller).
|
||||
Reference in New Issue
Block a user