最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google chrome - FedCM, are there token formats, what is "id" in the returned IdentityCredential and how are fi

programmeradmin3浏览0评论

I suppose this question is three questions. I have a IdP and RP setup in a lab for FedCM.

My navigator.credentials.get(...) call looks like:

navigator.credentials.get({
 identity: {
    context: "use",
    providers: [{
      fields: ["email"],
      configURL: `https://${idpOrigin}/fedcm.json`,
      clientId,
    }],
    mode: "active",
  }
})

I return a { "token": "dummy-token" } for the id_assertion endpoint which at the browser becomes an IdentityCredential via navigator.credentials.get() that looks like:

// IdentityCredential
{
  id: "",
  isAutoSelected: false,
  token: "dummy-id-token",
  type: "identity"
}

I'm trying to determine:

  1. Should I expect id to be something that isn't ""?
  2. Is there any capability or intention in the platform to specify the format of token?
  3. I understand fields specified in the navigator.credentials.get(options) are passed to the IdP, but are they only used by the user agent to display the disclosure text?

For bonus points, I noticed on Chrome 134 in active mode, the first account from the accounts endpoint pre-selected by default following the initial successful login. This forces user with multiple accounts to click back on the native UI. Everything else being equal in passive mode, the list of accounts shows on the top-right native UI overlay initially. I'm assuming this is a bug?

FYI: I'm testing with Chrome 134 on Windows 11 and a Pixel 6 Pro on Android 15.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论