{
  "slug": "browsercontext-storage-state-includes-virtual-webauthn-credentials-9e9dd05ee06d",
  "title": "BrowserContext storage state includes virtual WebAuthn credentials",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-24T21:55:03.000Z",
  "announced_at": "2026-07-24T21:55:03.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When saving a context that has virtual WebAuthn credentials, call `storageState({ credentials: true })` to include them. Restore that state in a later context with `storageState` or `setStorageState`; restoration installs the virtual authenticator and disables real authenticators in that context.",
    "examples": [
      "await context.storageState({ credentials: true, path: 'state.json' });",
      "const context = await browser.newContext({ storageState: 'state.json' });",
      "await context.setStorageState('state.json');"
    ],
    "gotchas": [
      "Version: v1.62.0",
      "credentials: Boolean option for `storageState`; set to `true` to include virtual WebAuthn credentials in the snapshot.",
      "path: File path for saving the state; if omitted, the state is returned but not saved to disk.",
      "storageState: `browser.newContext` option containing a state file path or state object to initialize the context.",
      "storageState (required): Argument to `setStorageState`; path or state object to apply to the existing context.",
      "Prerequisite: Use Playwright v1.62.0 or later for the release-note change.",
      "Prerequisite: Restoring state with credentials automatically installs the virtual WebAuthn authenticator; real authenticators will not work in that context.",
      "The option includes the context's virtual WebAuthn credentials (passkeys) in storage state.",
      "Docs conflict: Current API docs mark `credentials` as added in v1.61, while the v1.62.0 release note describes it as new in v1.62. The version attribution differs."
    ]
  },
  "why_it_matters": "Persist virtual WebAuthn credentials so a later browser context can be seeded with them.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.62.0",
    "https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-credentials",
    "https://playwright.dev/docs/auth#reuse-signed-in-state",
    "https://playwright.dev/docs/api/class-browsercontext#browser-context-set-storage-state",
    "https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-path",
    "https://playwright.dev/docs/api/class-browser#browser-new-context-option-storage-state",
    "https://playwright.dev/docs/api/class-browsercontext#browser-context-set-storage-state-param-storage-state"
  ],
  "rank": 0.92022,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-48c92cac04e84aed-5:gate",
    "evidence_hash": "b17276139b84e8e6a01d64416d3a7c27f07ddffc91b7a327300bf595585d287e"
  },
  "review": {
    "draft_hash": "d7d8fe1d033e6c3ea121767545aecaa5692c27df1235e051789611eb16ee4fd6",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.67 (>= 0.6 needed)."
  }
}
