ac617f4fe5
- MailModule with SMTP transport configured from ENV variables - MailService for password reset and welcome emails (plain text, i18n) - Password reset flow: request-reset (public), reset-password (token-based) - Change password for logged-in users with current password verification - Admin reset password endpoint (ADMIN/SUPER_ADMIN only, D-03) - ForcePasswordChangeInterceptor blocks all routes except change-password, logout, me when mustChangePassword=true (D-06, Pitfall 5) - Frontend: reset-password request page, token reset page, change-password page - Forgot password link added to login page - MailHog service added to docker-compose.dev.yml for dev email testing - SMTP env vars added to docker-compose.yml (defaults to MailHog) - Complete DE/EN i18n coverage for reset and change password flows - SUS packages installed: @nestjs-modules/mailer, nodemailer, ldapts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
275 B
TypeScript
15 lines
275 B
TypeScript
import { IsString, MinLength } from 'class-validator';
|
|
|
|
/**
|
|
* DTO for changing the current user's password.
|
|
* POST /auth/change-password
|
|
*/
|
|
export class ChangePasswordDto {
|
|
@IsString()
|
|
currentPassword!: string;
|
|
|
|
@IsString()
|
|
@MinLength(8)
|
|
newPassword!: string;
|
|
}
|