VerifyMFACodeDTO
Package: @nauth-toolkit/core
Type: DTO (Request/Response)
Data transfer objects for verifying MFA code using the appropriate provider.
- NestJS
- Express
- Fastify
import { VerifyMFACodeDTO, VerifyMFACodeResponseDTO } from '@nauth-toolkit/nestjs';
import { VerifyMFACodeDTO, VerifyMFACodeResponseDTO } from '@nauth-toolkit/core';
import { VerifyMFACodeDTO, VerifyMFACodeResponseDTO } from '@nauth-toolkit/core';
VerifyMFACodeDTO (Request)
| Property | Type | Required | Description |
|---|---|---|---|
sub | string | Yes | User sub. UUID v4 format. Trimmed and lowercased. |
methodName | string | Yes | MFA method name. Must be: totp, sms, email, passkey, backup. Max 50 characters. Trimmed and lowercased. |
code | string | Record<string, unknown> | Yes | Verification code or credential. For TOTP/SMS/Email/Backup: string code. For Passkey: credential object. |
deviceId | number | No | Optional device ID. Must be positive integer if provided. |
VerifyMFACodeResponseDTO (Response)
| Property | Type | Description |
|---|---|---|
valid | boolean | True if verification succeeds. |
Example
{
"sub": "a21b654c-2746-4168-acee-c175083a65cd",
"methodName": "totp",
"code": "123456"
}
Response:
{
"valid": true
}