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

Skip to main content

OryRecoveryCode

type OryRecoveryCode =
| {
code: string
used: false
}
| {
used: true
usedAt: Date | undefined
}

A backup recovery code shown in the settings flow.

Ory does not send the value of a spent code, only when it was used.

Type declaration​

{
code: string
used: false
}
NameTypeDescription
codestringThe code the user can enter to sign in.
usedfalse-
{
used: true
usedAt: Date | undefined
}
NameTypeDescription
usedtrue-
usedAtDate | undefinedWhen the code was used, if Ory sent a valid timestamp.