AdminResetPasswordDTO
Package: @nauth-toolkit/core
Type: DTO (Request/Response)
Data transfer objects for admin-initiated password reset workflow. Sends verification code (and optional link) to user via email/SMS, allowing them to set their own password.
- NestJS
- Express
- Fastify
import { AdminResetPasswordDTO, AdminResetPasswordResponseDTO } from '@nauth-toolkit/nestjs';
import { AdminResetPasswordDTO, AdminResetPasswordResponseDTO } from '@nauth-toolkit/core';
import { AdminResetPasswordDTO, AdminResetPasswordResponseDTO } from '@nauth-toolkit/core';
AdminResetPasswordDTO (Request)
| Property | Type | Required | Description |
|---|---|---|---|
baseUrl | string | No | Base URL for building reset link. Valid URL with http:// or https://. Max 2048 chars. |
codeExpiresIn | number | No | Code expiry in seconds. Min 300 (5 min), max 86400 (24 hours). Default: 3600 (1 hour). |
deliveryMethod | 'email' | 'sms' | No | Delivery channel. Default: 'email'. |
sub | string | Yes | User sub (UUID v4). Trimmed, lowercased for consistency. |
reason | string | No | Reason for admin-initiated reset (for audit trail). Max 500 chars. Trimmed. |
revokeSessions | boolean | No | Revoke all active sessions immediately (before sending). Default: false. |
AdminResetPasswordResponseDTO (Response)
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Always true on success. |
deliveryMedium | 'email' | 'sms' | No | Delivery medium used. |
destination | string | No | Masked destination where code was sent. |
expiresIn | number | No | Code expiry in seconds. |
sessionsRevoked | number | No | Number of sessions revoked (only present if revokeSessions was true). |
Example
{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"baseUrl": "https://myapp.com/reset-password",
"deliveryMethod": "email",
"revokeSessions": true,
"reason": "User reported account compromise"
}