demo · v136

FedCM alt fields

Picture the account-chooser UI Chrome shows for FedCM logins. Toggle which fields the IdP returned (username, phone, email, name) and see how the disambiguation card changes.

Probing…
What the FedCM API can do: only IdPs configured in your browser can answer navigator.credentials.get({identity: ...}). The picker below is a true-to-spec UI mockup so you can see the shape of the new fields without needing an active IdP.

Fields returned by the IdP:

Choose an account to continue

the code

const cred = await navigator.credentials.get({
  identity: {
    providers: [{
      configURL: "https://idp.example/config.json",
      clientId: "app-id",
      // 136+: pick which fields the chooser surfaces:
      fields: ["name", "email", "username", "tel"],
    }],
  },
});

see also