我已经为新的谷歌一键登录/注册设置了一个基本测试。
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<script src="https://smartlock.google.com/client"></script>
<script>
window.onGoogleYoloLoad = (googleyolo) => {
googleyolo.hint({
supportedAuthMethods: [
"https://accounts.google.com"
],
supportedIdTokenProviders: [{
uri: "https://accounts.google.com",
clientId: "xxxxx-xxxxx.googleusercontent.com"
}],
context: "signUp"
}).then((credential) => {
console.log(credential);
}, (error) => {
console.log(error.type);
});
};
</script>
</body>我希望上面的内容要么向控制台吐出凭据对象,要么提示我选择一个要登录的google帐户。相反,将引发"noCredentialsAvailable“错误类型。当我使用googleyolo.retrieve承诺时,也会发生这种情况。
我目前:
我遗漏了什么?
发布于 2017-11-01 01:49:21
我们刚刚发布了一些故障排除指南:https://developers.google.com/identity/one-tap/web/troubleshooting
要检查的最重要事项如下:
如果你仍然不能让它工作,或者有任何反馈,我们很想听到你的意见:联系sso@google.com
https://stackoverflow.com/questions/46998824
复制相似问题