Skip to content

Store passkey metadata in extension storage #6

@gppmad

Description

@gppmad

Store passkey metadata in extension storage

Title: Store passkey metadata in extension storage

Description:

After successful registration, persist the passkey (private key + metadata) to chrome.storage.local so it can be retrieved later for authentication.

Acceptance Criteria:

  • Store passkey in chrome.storage.local after response is sent to website
  • All required fields are persisted
  • Data survives browser restart
  • Console log confirms storage success
  • Tested on https://webauthn.io — verify data persists

Storage Structure:

Location: background.js (handle chrome.storage operations)

Store this data:

{
  [credentialId]: {
    rpId: "webauthn.io",              // Relying party ID
    userName: "user@example.com",     // User identifier
    publicKey: "base64_public_key",   // Public key (base64)
    privateKey: "base64_private_key", // Private key (base64) - UNENCRYPTED for now
    created: "2025-10-28T12:00:00Z"  // ISO timestamp
  }
}

Required Fields:

  • rpId — Website domain (from options.rp.id)
  • userName — User email/name (from options.user.name)
  • publicKey — Base64-encoded public key
  • privateKey — Base64-encoded private key
  • created — ISO timestamp

Implementation:

  1. Receive passkey data from inject.js via content.js
  2. In background.js: Store to chrome.storage.local
  3. Log storage confirmation to console
  4. Handle errors gracefully

Testing:

  1. Load extension
  2. Visit https://webauthn.io → Register
  3. Complete registration flow
  4. Open DevTools → Application tab → Storage → Local Storage (extension ID)
  5. Verify passkey is stored with all fields

Blocked by: Format and return proper WebAuthn attestation response

Blocks: Add master password encryption to stored private keys

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions