-
Notifications
You must be signed in to change notification settings - Fork 15
Add isProtocolSupportedByClient static method #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is it only one-at-a-time for "user privacy" reasons? I see in #168 (comment) that "boolean testing is often preferred to providing a set for privacy reasons," but hypothetical use of the proposed method, like this... const supportsOid4vp = await isProtocolSupportedByClient('openid4vp');
const supportsFooProtocol = await isProtocolSupportedByClient('fooproto'); ...seems equivalent to a method " Will I understand the need to enable developers to understand when a specific profile is supported or not, but whatever method we define for this will stick around for a long time. We have a chance to do something better right out the gate because, to your point, we've learned this lesson the hard way during the evolution of WebAuthn into passkeys... |
Thinking about this method's API, what about something like this instead? const supported = await DigitalCredential.getClientSupportedProtocols();
if (supported.includes('openid4vp')) {
// Call DC API w/OID4VP
} else if (supported.includes('fooproto')) {
// Call DC API w/FooProto
} else {
throw new Error("Verifier website only implemented the above protocols");
} It's a simple list to query for, and a developer adding support for a new protocol can come back in and add an Edit: Connecting a couple of threads, back in January @kdenhartog mentioned it might not be degrading privacy to offer a list of values:
And it seems in line with what @marcoscaceres and other Editors discussed earlier that month:
Edit: Nevermind to this idea, it wouldn't make it easy for any platform to signal that it supports all protocols because it'd require the platform to maintain a list of all the possible protocols. That's not really feasible... |
Discussed on 2025-04-30 Series B call https://github.com/w3c-fedid/meetings/blob/main/2025/2025-04-30-DCAPI-B-notes.md |
Based on discussion at the 2025-04-11 hybrid meeting and in #200, this issue proposes the creation of a new static method called
isProtocolSupportedByClient
, which takes a protocol identifier string as input, and returns a promise that resolves with a boolean.This only represents whether the client (e.g. browser) understand the request enough to pass it southbound to the platform. It does NOT represent whether a credential provider/wallet is available and can support the protocol.
As an aside, as I said in the F2F, I think we will regret the ergonomics of this (vs a more general getClientCapabilities() method) long term, just as we did with WebAuthn 6+ years later, but I'd like to get this moving forward as this is important for developers.
The text was updated successfully, but these errors were encountered: