v151 · identity · feature detection

Protocol allowlist checker

DigitalCredential.userAgentAllowsProtocol() synchronously reports whether browser policy allows distributing requests for a protocol. It does not reveal whether a wallet, credential, provider, or underlying OS capability is available.

Protocols in the current Editor’s Draft

ProtocolContextuserAgentAllowsProtocol()

Check any protocol string

Type a protocol identifier and check it.

How it works

// Static on the DigitalCredential interface object — guard it, it may be absent.
if (globalThis.DigitalCredential?.userAgentAllowsProtocol?.("openid4vp-v1-unsigned")) {
  // Browser policy permits this presentation protocol; wallet support is separate.
} else {
  // API absent, or browser policy does not permit this protocol.
}

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗