JavaScript: getStatus

Returns the enrollment status of the user's recovery codes: the total number of codes in the current set and how many are still unused. Never returns the codes themselves.

Requires auth.experimental.recoveryCodes: true.

Examples

Get the recovery codes status

const { data, error } = await supabase.auth.mfa.recoveryCodes.getStatus()