Thrown when the browser blocks the popup window opened by mfa.challengeWithPopup.
Most browsers block popups unless they are triggered by a direct user action (e.g., a click handler). Prompt the user to allow popups for your site.
import { PopupBlockedError } from '@auth0/nextjs-auth0/errors';try { await mfa.challengeWithPopup({ audience: 'https://api.example.com' });} catch (err) { if (err instanceof PopupBlockedError) { alert('Please allow popups for this site.'); }} Copy
import { PopupBlockedError } from '@auth0/nextjs-auth0/errors';try { await mfa.challengeWithPopup({ audience: 'https://api.example.com' });} catch (err) { if (err instanceof PopupBlockedError) { alert('Please allow popups for this site.'); }}
Optional
Thrown when the browser blocks the popup window opened by mfa.challengeWithPopup.
Most browsers block popups unless they are triggered by a direct user action (e.g., a click handler). Prompt the user to allow popups for your site.
Example