Skip to main content

GetChallengeDataResponseDTO

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

Response data transfer object for MFA challenge data. The shape of challengeData varies by MFA method.

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

Properties

PropertyTypeDescription
challengeDataRecord<string, unknown>Method-specific challenge data. Shape varies by MFA method — see below.

challengeData shape by method

MethodShapeDescription
passkeyRecord<string, unknown>WebAuthn public key options object ({ publicKey: { challenge, allowCredentials, rpId, ... } })
smsstringMasked phone number (e.g., ***-***-1234)
emailstringMasked 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"
}

Used By