Skip to content

[Request]: passkey sign-in on operator alias origins #729

Closed

Description

@jimhoyd

Problem or use case

#717 adds an operator-set list of alias origins (--alias-origin, URLCODE_ALIAS_ORIGINS) that every extension's same-origin check honours: mcp, forms, store, auth and admin. Passkey (WebAuthn) ceremonies in the auth extension still use only the canonical origin: expectedOrigin and the relying-party ID come from --origin. So a passkey sign-in or registration started on an alias hostname fails. Password and email flows work there.

This was left out of #717 on purpose and is documented in the auth README. Found while implementing #717; not reproduced against a real browser.

Proposed behavior and alternatives

  • Accept any site origin (canonical plus aliases) as expectedOrigin, when the aliases are subdomains of a registrable domain that can serve as a shared RP ID (e.g. urlcode.ai for mcp.urlcode.ai). Refuse at startup, or document, when an alias cannot share the RP ID, since WebAuthn binds credentials to one RP ID.
  • Alternative: WebAuthn Related Origin Requests (a /.well-known/webauthn list), where browser support allows.
  • Alternative: keep canonical-only, and redirect passkey ceremonies from an alias to the canonical origin.

Needs a decision on which approach to take before implementing.

Activity

  1. added
    enhancement
    extension
    on Sep 25, 2026
  2. jimhoyd commented on Sep 25, 2026

    @jimhoyd
    CollaboratorAuthor

    Decision (owner, 2026-09-25): opt-in shared relying-party domain, set by the operator.

    • A new operator setting next to --alias-origin (e.g. --passkey-rp-id urlcode.ai; env URLCODE_PASSKEY_RP_ID for AWS/Vercel). It is never set in YAML.
    • Core validates that it is a registrable-domain suffix of the canonical origin's host and of every alias origin that should accept passkeys. Refuse at startup otherwise, and refuse public suffixes (e.g. com, co.uk) and IP hosts.
    • WebAuthn ceremonies use it as the RP ID and accept any site origin (canonical + aliases) as expectedOrigin.
    • Default unchanged: the RP ID stays the canonical host, so existing passkeys keep working. The docs must warn that changing the RP ID means existing passkeys stop working and users must re-register. Consider a startup warning when the RP ID differs from the one existing credentials were registered under, if that is recorded.

    Removing needs-decision (if set). Ready to implement.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions