Skip to main content

GenerateBackupCodesResponseDTO

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

Single-use recovery codes issued for the current user.

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

Properties​

PropertyTypeRequiredDescription
codesstring[]YesPlaintext 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.

Used By​