FedCM (Federated Credential Management) is a browser API proposal that aims to provide frictionless federated login. It offers developers a secure, privacy-conscious workflow, simplifying how users log in on the web.
navigator.credentials.get()` with identity providers listed.
// Example: relying party initiating FedCM login
async function loginWithFedCM() {
const cred = await navigator.credentials.get({
identity: {
providers: [
{
configURL: 'https://idp.example.com/fedcm/manifest.json',
clientId: 'YOUR_CLIENT_ID'
}
]
}
});
// credential assertion obtained
console.log('Identity assertion:', cred);
}
// From IdP origin, when user logs in or out
// user logs in
navigator.login.setStatus('logged-in');
// user logs out
navigator.login.setStatus('logged-out');
FedCM promises to change how logins are done on the web by offering a simpler, more privacy-aware, and secure federated login standard.
For developers, it’s worth tracking, experimenting with, and preparing to adopt, since it could become the default way users authenticate in web apps.