files/en-us/web/api/federatedcredentialinit/index.md
{{APIRef("Credential Management API")}}
The FederatedCredentialInit dictionary represents the object passed to {{domxref("CredentialsContainer.create()")}} as the value of the federated option: that is, when creating a {{domxref("FederatedCredential")}} object representing a credential associated with a federated identify provider.
[!NOTE] The Federated Credential Management API (FedCM) supersedes the {{domxref("FederatedCredential")}} interface in favor of the {{domxref("IdentityCredential")}} interface.
The
FederatedCredentialInitdictionary is not used when working with theIdentityCredentialinterface.
iconURL {{optional_inline}}
id
name {{optional_inline}}
origin
protocol {{optional_inline}}
"openidconnect").provider
"https://www.facebook.com" or "https://accounts.google.com").const credInit = {
id: "1234",
name: "Serpentina",
origin: "https://example.org",
protocol: "openidconnect",
provider: "https://provider.example.org",
};
const makeCredential = document.querySelector("#make-credential");
makeCredential.addEventListener("click", async () => {
const cred = await navigator.credentials.create({
federated: credInit,
});
console.log(cred.name);
console.log(cred.provider);
});
{{Specifications}}