AdvancedPW-MFA-00440 minutesPlaywright

Recover a synthetic MFA challenge

Recovery is an isolated in-Lab path that is available only after MFA is enabled and never sends email or SMS.

  • authentication
  • api
  • recovery

Objective

What to automate

Enable MFA for admin_user, use the public recovery code, then complete the returned recovery challenge.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-AUTH-001.

Test data

  • username: admin_user
  • recovery code: RECOVER-4803
  • OTP: 480321

Expected result

A recovery challenge is created and its verified result creates a synthetic Admin UI session.

Progressive hints

Hint 1

MFA enrollment must be enabled before the recovery request.

Hint 2

Use the recovery endpoint to obtain a new challenge ID.

Hint 3

Verify the returned challenge using the same public synthetic OTP.

I’ve tried it — show solution
  1. MFA enrollment must be enabled before the recovery request.
  2. Use the recovery endpoint to obtain a new challenge ID.
  3. Verify the returned challenge using the same public synthetic OTP.

The deliberately failing starter is in tests/mfa.spec.ts inside the TypeScript starter ZIP.