Google yolo不允许客户来源使用此API

时间:2018-10-25 08:30:38

标签: google-signin google-oauth2 google-identity

我仍在使用Google yolo即使Google批准了请求,也不允许客户端来源使用此API错误。

即使OAuth同意屏幕也显示为已发布。有人知道为什么仍然会发生此错误吗?

代码:

window.onGoogleYoloLoad = (googleyolo) => {
    // The 'googleyolo' object is ready for use.
    console.log("Googleyolo is ready to use.");
    const retrievePromise = googleyolo.retrieve({
        supportedAuthMethods: [
            "https://accounts.google.com",
            "googleyolo://id-and-password"
        ],
        supportedIdTokenProviders: [
            {
                uri: "https://accounts.google.com",
                clientId: "xxxxxx.apps.googleusercontent.com"
            }
        ]
    }).....

1 个答案:

答案 0 :(得分:0)

这可以通过在Google Developer Console中授权当前的重定向URL来解决。  在Google控制台“授权的JavaScript来源”中输入您的开发/服务器部署的URL