Thrown when the user closes the popup window before completing MFA.
The SDK polls popup.closed every 500ms to detect manual closure. This is a user-initiated cancellation, not an error condition.
popup.closed
import { PopupCancelledError } from '@auth0/nextjs-auth0/errors';try { await mfa.challengeWithPopup({ audience: 'https://api.example.com' });} catch (err) { if (err instanceof PopupCancelledError) { console.log('User cancelled MFA.'); }} Copy
import { PopupCancelledError } from '@auth0/nextjs-auth0/errors';try { await mfa.challengeWithPopup({ audience: 'https://api.example.com' });} catch (err) { if (err instanceof PopupCancelledError) { console.log('User cancelled MFA.'); }}
Optional
Thrown when the user closes the popup window before completing MFA.
The SDK polls
popup.closedevery 500ms to detect manual closure. This is a user-initiated cancellation, not an error condition.Example