Skip to main content

SendVerificationEmailDTO

Package: @nauth-toolkit/core Type: DTO (Request)

Request DTO for sending verification emails with codes and optional verification links.

import { SendVerificationEmailDTO } from '@nauth-toolkit/nestjs';

Properties

PropertyTypeRequiredDescription
substringYesUser identifier (UUID v4). Trimmed and lowercased.
baseUrlstringNoBase URL for verification link. Must be valid URL with http:// or https://. Max 2048 chars.
skipAlreadyVerifiedCheckbooleanNoSkip "already verified" check. Used for MFA contexts where codes needed even if email verified.
challengeSessionIdnumberNoChallenge session ID to link this verification to. Prevents old tokens from being used with new sessions.
challengeSessionTokenstringNoChallenge session token (UUID v4). Included in verification link for cross-browser verification.

Example

{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"baseUrl": "https://example.com",
"skipAlreadyVerifiedCheck": false,
"challengeSessionId": 42,
"challengeSessionToken": "b32c765d-3857-5279-bdff-d286194b76de"
}

Used By