GenerateBackupCodesResponseDTO
Package: @nauth-toolkit/core
Type: DTO (Response)
Single-use recovery codes issued for the current user.
- NestJS
- Express
- Fastify
import { GenerateBackupCodesResponseDTO } from '@nauth-toolkit/nestjs';
import { GenerateBackupCodesResponseDTO } from '@nauth-toolkit/core';
import { GenerateBackupCodesResponseDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description |
|---|---|---|---|
codes | string[] | Yes | Plaintext recovery codes. Returned once; only hashes are kept at rest, so codes cannot be re-read later. |
Example
{
"codes": ["A1B2C3D4", "E5F6G7H8", "J9K0L1M2"]
}
warning
Generating codes replaces any set the user already held. Show these to the user immediately — they cannot be retrieved again.