isPendingRecoveryCodesAcknowledgment
Checks if the user is still pending acknowledgment of their MFA recovery codes. This function determines whether the user has been presented with recovery codes that they have not yet acknowledged as saved or backed up. When MFA is set up, users receive recovery codes that can be used to regain access if they lose their MFA device. It’s important to ensure users acknowledge these codes before proceeding.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
boolean - Returns true if recovery codes are pending acknowledgment, false otherwise.
Examples
Prompt user to acknowledge recovery codes
Block access until acknowledgment
Conditional UI rendering
Check during onboarding
Listen for user state changes
How it works
The function checks the user’smfaBackupCodeAcknowledgement status:
pending: User has been given recovery codes but hasn’t acknowledged themcomplete: User has acknowledged their recovery codesnullorundefined: Treated as pending (user hasn’t explicitly completed acknowledgment)
true for any status that is not explicitly complete, ensuring users must actively acknowledge their recovery codes.
When does this apply?
This check is relevant when:- A user has set up MFA for the first time
- A user has created new recovery codes
- MFA is required by your application settings
false.
Error handling
The function throws an error if the user is not logged in:Related
- acknowledgeRecoveryCodes - Mark recovery codes as acknowledged
- getMfaRecoveryCodes - Get user’s recovery codes
- isUserOnboardingComplete - Check if user completed all onboarding requirements
- isUserMissingMfaAuth - Check if user needs MFA authentication
- Recovery Codes Guide - Complete guide to recovery codes