Verification with OTP code from authenticator app.
import { mfa } from '@auth0/nextjs-auth0/client';try { await mfa.verify({ mfaToken: encryptedToken, otp: '123456' // From Google Authenticator }); // User authenticated, access token in session} catch (error) { if (error instanceof MfaVerifyError) { console.error('Invalid OTP code'); }} Copy
import { mfa } from '@auth0/nextjs-auth0/client';try { await mfa.verify({ mfaToken: encryptedToken, otp: '123456' // From Google Authenticator }); // User authenticated, access token in session} catch (error) { if (error instanceof MfaVerifyError) { console.error('Invalid OTP code'); }}
Encrypted MFA token
Verification with OTP code from authenticator app.
Example