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

Skip to main content

parseRecoveryCodes()

function parseRecoveryCodes(node: undefined | UiNodeText): OryRecoveryCode[]

Parses the codes of the lookup_secret_codes node, in the order Ory sent them.

To find the node in flow.ui.nodes, narrow the nodes with isUiNodeText.

Parameters​

ParameterTypeDescription
nodeundefined | UiNodeTextThe lookup_secret_codes text node, if the flow has one.

Returns​

OryRecoveryCode[]

The codes, or an empty list if the node is missing.