Skip to main content

SetPhoneAndSendVerificationDTO

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

Request DTO for saving a phone number on a user and sending the verification SMS in one step.

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

Properties​

PropertyTypeRequiredDescription
challengeSessionIdnumberNoChallenge session ID to link the verification token to. Positive integer.
phonestringYesPhone number in E.164 format (+14155552671). Whitespace removed. Max 20 characters. Replaces the phone on file when different.
substringYesUser identifier (UUID v4). Trimmed and lowercased.

Example​

{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"phone": "+14155552671",
"challengeSessionId": 42
}

Used By​