IdentityCredentialError: thuộc tính error

Note: This feature is available in Web Workers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Thuộc tính chỉ đọc error của giao diện IdentityCredentialError là một trong các giá trị được liệt kê trong danh sách lỗi được chỉ định bởi OAuth 2.0 hoặc một chuỗi tùy ý cung cấp thêm thông tin về lỗi.

Giá trị

Một trong các giá trị được liệt kê trong danh sách lỗi được chỉ định bởi OAuth 2.0 hoặc một chuỗi tùy ý.

Ví dụ

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;
}

Thông số kỹ thuật

Thông số kỹ thuật
Federated Credential Management API
# dom-identitycredentialerror-error

Tương thích trình duyệt

Xem thêm