IdentityCredentialError: error property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("FedCM API")}}{{AvailableInWorkers}}{{SeeCompatTable}}

The **error** read-only property of the {{domxref("IdentityCredentialError")}} interface is either one of the values listed in the OAuth 2.0 specified error list or an arbitrary string giving more information about the error.

Value

One of the values listed in the OAuth 2.0 specified error list or an arbitrary string.

Examples

js
try {
  const cred = await navigator.credentials.get({
    identity: {
      providers: [
        {
          configURL: "https://idp.example/manifest.json",
          clientId: "1234",
        },
      ],
    },
  });
} catch (e) {
  const error = e.error;
  const url = e.url;
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also