w3c / webappsec-credential-management

WebAppSec Credential Management
https://w3c.github.io/webappsec-credential-management/
Other
49 stars 37 forks source link

Request a credential behavior when no interface is matched #249

Closed marcoscaceres closed 2 months ago

marcoscaceres commented 2 months ago

In the spec, for "Request a Credential", we currently assume that a match is made for an interface type:

For each interface in options’ relevant credential interface objects:

If settings’ active credential types contains interface’s [[type]], return a promise rejected with a "NotAllowedError" DOMException.

I think we should throw a NotSupportedError first if "relevant credential interface objects" returns an empty list.

(and eventually change that to "relevant credential interface object", with no "s" ;) )

marcoscaceres commented 2 months ago

Noting this would match Firefox and Safari's behavior.

Chrome resolves with null.