Back to Content

Permissions-Policy: identity-credentials-get directive

files/en-us/web/http/reference/headers/permissions-policy/identity-credentials-get/index.md

latest1.4 KB
Original Source

{{SeeCompatTable}}

The HTTP {{HTTPHeader("Permissions-Policy")}} header identity-credentials-get directive controls whether the current document is allowed to use the Federated Credential Management API (FedCM), and more specifically usage of the following methods:

  • {{domxref("CredentialsContainer.get", "navigator.credentials.get()")}} (when used with the identity option)
  • {{domxref("IdentityCredential.disconnect_static", "IdentityCredential.disconnect()")}}
  • {{domxref("IdentityProvider.getUserInfo_static", "IdentityProvider.getUserInfo()")}}

Where this policy forbids use of the API, {{jsxref("Promise")}}s returned by these methods will reject with a NotAllowedError {{domxref("DOMException")}}.

Syntax

http
Permissions-Policy: identity-credentials-get=<allowlist>;
  • <allowlist>

Default policy

The default allowlist for identity-credentials-get is self.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also