Javascript Google Smartlock/Googleyolo未返回保存的密码
根据文档,我们可以获得保存的密码,就像在Chrome上使用凭证管理API一样 我目前已经在浏览器中登录到谷歌。 我尝试使用googleyolo api,使用.retrieve函数,如文档所示:Javascript Google Smartlock/Googleyolo未返回保存的密码,javascript,google-api,google-authentication,google-identity,google-smartlockpasswords,Javascript,Google Api,Google Authentication,Google Identity,Google Smartlockpasswords,根据文档,我们可以获得保存的密码,就像在Chrome上使用凭证管理API一样 我目前已经在浏览器中登录到谷歌。 我尝试使用googleyolo api,使用.retrieve函数,如文档所示: const retrievePromise = googleyolo.retrieve({ supportedAuthMethods: [ "https://accounts.google.com", "googleyolo://id-and-password" ], supp
const retrievePromise = googleyolo.retrieve({
supportedAuthMethods: [
"https://accounts.google.com",
"googleyolo://id-and-password"
],
supportedIdTokenProviders: [
{
uri: "https://accounts.google.com",
clientId: "*********-**********.apps.googleusercontent.com"
}
]
}).then(res => console.log(res));
它只返回idToken,不返回密码
但奇怪的是,当我尝试在Chrome上使用凭证管理API时,我保存的凭证弹出了
问题是,,
1.出了什么问题?
2.googleyolo是从哪里得到它的证书列表的?因为我在我的网站上进行了检查,并且我的凭据存在
3.要获取密码凭据,我应该做什么/进行哪些故障排除?不确定从何处获取密码凭据oogleyolo://id-and-password 来自supportedAuthMethods参数中的。在你的链接中,它明确表示只支持谷歌 googleyolo从您当前的浏览器中获取用户列表。如果您有多个用户登录到谷歌帐户,您将获得更多用户 当我实现GoogleSignon时,我只需使用idtoken来确认用户的身份。调用googleyolo不会返回密码 确认用户身份后,可以使用提供的方法登录
useGoogleIdTokenForAuth(credential.idToken);
很抱歉造成混淆,密码仅在支持库用于检索密码的凭据管理API的浏览器中可用。将更新文件以澄清这一点 谢谢你的回答。我是从他们的文档中得到的,请参阅声明googleyolo://id-and-password. 在Handle上还有凭证请求结果部分,说明可以检索密码。或者我可能误解了文档?听起来只有当用户通过登录过程的实现输入密码时,您才能检索密码。任选googleyolo://id-and-password 在没有保存Google帐户时检索基于密码的凭据。