New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

OrySettingsRecoveryCodesProps

type OrySettingsRecoveryCodesProps = {
codes: string[]
isSubmitting: boolean
onRegenerate: () => void
onReveal: () => void
recoveryCodes: OryRecoveryCode[]
regenerateButton: UiNodeInput | undefined
revealButton: UiNodeInput | undefined
usage: OryRecoveryCodesUsage | undefined
}

Props for the recovery codes section of the settings flow.

Properties​

codes​

codes: string[];

One entry per recovery code, in the order of recoveryCodes. An unspent code is its value. A spent code is a localized label, such as "Used Aug 18". Entries are not unique, because codes spent on the same day share a label, so key rendered entries by index, not by entry.


isSubmitting​

isSubmitting: boolean

onRegenerate()​

onRegenerate: () => void;

Returns​

void


onReveal()​

onReveal: () => void;

Returns​

void


recoveryCodes​

recoveryCodes: OryRecoveryCode[];

The revealed recovery codes, spent and unspent, in display order. Empty until the user reveals or regenerates the codes.


regenerateButton​

regenerateButton: UiNodeInput | undefined

revealButton​

revealButton: UiNodeInput | undefined

usage​

usage: OryRecoveryCodesUsage | undefined

How many codes are left. After the user reveals the codes, it is counted from them. Undefined while regenerated codes await confirmation, and before the user reveals the codes when Ory sends no count.