Skip to content

fix: advertise fido2-vault-credentials in /api/config for extension passkey UX#160

Closed
shuaiplus wants to merge 1 commit intomainfrom
codex/fix-passkey-authentication-issue-in-nodewarden
Closed

fix: advertise fido2-vault-credentials in /api/config for extension passkey UX#160
shuaiplus wants to merge 1 commit intomainfrom
codex/fix-passkey-authentication-issue-in-nodewarden

Conversation

@shuaiplus
Copy link
Copy Markdown
Owner

Motivation

  • Ensure Bitwarden browser extensions detect that the server supports storing/using passkeys in the vault so the extension can surface its passkey UX instead of letting browsers fall back to native/system passkey prompts.

Description

  • Add experimentalClientFeatureFlags: ['fido2-vault-credentials'] and enable 'fido2-vault-credentials': true inside featureStates in the /api/config response implemented in src/router-public.ts.

Testing

  • Ran npm run build to build the web client and it completed successfully.
  • Ran npx tsc -p tsconfig.json --noEmit for TypeScript checks and it completed successfully.

Codex Task

Copilot AI review requested due to automatic review settings March 31, 2026 14:27
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 31, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
nodewarden ba990e1 Mar 31 2026, 02:30 PM

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the public /api/config (and /config) response to advertise server support for passkey-related vault functionality so Bitwarden browser extensions can enable their passkey UX instead of falling back to native/system prompts.

Changes:

  • Adds experimentalClientFeatureFlags: ['fido2-vault-credentials'] to the config payload.
  • Enables 'fido2-vault-credentials': true in featureStates and documents why it’s exposed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +105 to +113
experimentalClientFeatureFlags: ['fido2-vault-credentials'],
_icon_service_url: buildIconServiceTemplate(origin),
_icon_service_csp: buildIconServiceCsp(origin),
featureStates: {
'duo-redirect': true,
'email-verification': true,
// Browser extensions only enable passkey vault storage/login UX when this
// server capability flag is exposed in /api/config.
'fido2-vault-credentials': true,
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string literal 'fido2-vault-credentials' is duplicated in both experimentalClientFeatureFlags and featureStates. Consider defining a single constant (or deriving one from the other) so the flag name can’t drift if it ever changes/expands.

Copilot uses AI. Check for mistakes.
@shuaiplus shuaiplus closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants