GetChallengeDataResponseDTO
Package: @nauth-toolkit/core
Type: DTO (Response)
Response data transfer object for MFA challenge data. The shape of challengeData varies by MFA method.
- NestJS
- Express
- Fastify
import { GetChallengeDataResponseDTO } from '@nauth-toolkit/nestjs';
import { GetChallengeDataResponseDTO } from '@nauth-toolkit/core';
import { GetChallengeDataResponseDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Description |
|---|---|---|
challengeData | Record<string, unknown> | Method-specific challenge data. Shape varies by MFA method — see below. |
challengeData shape by method
| Method | Shape | Description |
|---|---|---|
passkey | Record<string, unknown> | WebAuthn public key options object ({ publicKey: { challenge, allowCredentials, rpId, ... } }) |
sms | string | Masked phone number (e.g., ***-***-1234) |
email | string | Masked email address (e.g., u***r@example.com) |
Use typeof challengeData === 'string' to distinguish SMS/email from passkey on the client.
Examples
Passkey
{
"challengeData": {
"publicKey": {
"challenge": "base64url-encoded-challenge",
"allowCredentials": [],
"rpId": "example.com",
"userVerification": "preferred"
}
}
}
SMS / Email
{
"challengeData": "***-***-1234"
}