Skip to content

Add support for FIDO Convenience MDS - #812

Merged
MasterKale merged 71 commits into
masterfrom
feat/convenience-mds-support
Oct 27, 2026
Merged

MasterKale merged 71 commits into
masterfrom
feat/convenience-mds-support

Conversation

@MasterKale

@MasterKale MasterKale commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

This PR adds a new ConvenienceMetadataService that enables RPs to leverage the FIDO Convenience Metadata Service (C-MDS). This service provides localized names and light and dark iconography for credential providers, keyed by the AAGUID they return from WebAuthn .create() calls. This service is intended to help Relying Parties display user-friendly names and icons in RP user self management portals when displaying a user's passkeys.

By default, a bare call to ConvenienceMetadataService.initialize() will now automatically query the FIDO Alliance's official service at https://c-mds.fidoalliance.org:

import { ConvenienceMetadataService } from '@simplewebauthn/server';

await ConvenienceMetadataService.initialize();

Custom server URLs and local metadata can also be specified:

import { ConvenienceMetadataService } from '@simplewebauthn/server';

const localPayloadFile = await readPayloadFromDisk();

// It's possible to only use locally available provider metadata
// if you set `mdsServers` to an empty array
await ConvenienceMetadataService.initialize({
  mdsServers: [],
  payloads: [localPayloadFile],
});

An AAGUID can be passed into the ConvenienceMetadataService.getProviderMetadata() method to get the corresponding localized names and icons for that credential provider:

const metadata = await ConvenenienceMetadataService.getProviderMetadata(
  '531126d6-e717-415c-9320-3d9aa6981239',
);
// {
//   "friendlyNames": { "en-US": "Dashlane" },
//   "providerLogoLight": "data:image/svg+xml;base64,...",
//   "providerLogoDark": "data:image/svg+xml;base64,..."
// }

Calls to getProviderMetadata() will attempt to detect and refresh stale MDS data. Attempts to refresh data will avoid downloading anything when there's nothing new to download and retry a day later; error responses will defer the refresh attempt to a few hours later in case it's due to C-MDS server rate-limiting/transient issue/etc...

Additionally, verifyRegistrationResponse() will now try to include provider metadata as registrationInfo.passkeyProviderMetadata if ConvenienceMetadataService or MetadataService are initialized!

Changes to MetadataService

For projects already using MetadataService, an AAGUID can similarly be passed into the new MetadataService.getProviderMetadata() method to get the corresponding localized names and icons for that credential provider:

import { MetadataService } from '@simplewebauthn/server';

await MetadataService.initialize();

const metadata = await MetadataService.getProviderMetadata(
  '531126d6-e717-415c-9320-3d9aa6981239',
);
// {
//   "friendlyNames": { "en-US": "Dashlane" },
//   "providerLogoLight": "data:image/svg+xml;base64,...",
//   "providerLogoDark": "data:image/svg+xml;base64,..."
// }

This does not require use of ConvenienceMetadataService, and in fact it's encouraged to only use one or the other based on the Relying Party's needs.

MetadataService will similarly attempt to refresh stale metadata, and gracefully handle bad MDS server responses. Stale MDS metadata will continue to be served until the refresh can be attempted a few hours later. Refreshing an MDS blob that fails subsequent validation will still fail closed.

Fixes #743.

@MasterKale MasterKale added the package:server @simplewebauthn/server label Oct 8, 2026
@MasterKale
MasterKale marked this pull request as ready for review October 26, 2026 22:18
@MasterKale
MasterKale merged commit df53178 into master Oct 27, 2026
15 checks passed
@MasterKale
MasterKale deleted the feat/convenience-mds-support branch October 27, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:server @simplewebauthn/server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meaningfully expose FIDO's new Convenience Metadata Service

1 participant