A step-by-step guide to implementing TOTP MFA with a custom UI using Dynamic’s headless hooks.
useSyncMfaFlow
hook is key for account-based MFA. It detects when an MFA challenge is required and calls your handler, letting you update the UI to prompt the user.
addDevice
flow. This generates a secret and URI for displaying a QR code.
authenticateDevice
to verify the code.
qrcode
package installed: npm install qrcode @types/qrcode
.