难以要求示波器https://www.googleapis.com/auth/plus.login



早上好,不确定这是否是正确的地方,但是在使用我们的安装屏幕时,我们遇到了几个问题,而OAuth窗口不断闪烁。我们已经将其调试到尝试获得许多范围的尝试,然后将其缩小到范围:

https://www.googleapis.com/auth/plus.login

https://www.googleapis.com/discovery/v1/apis/drive/v3/rest没有返回我们要求的范围。

这以前是在工作,但现在似乎引起了问题。您知道是否有任何可能会影响此的变化,或者是否有任何简单的修复方法?这是我呼吁获得范围并要求许可的呼吁:

  'apiKey': '---------',
    'discoveryDocs': [discoveryUrl],
    'clientId': '--------.apps.googleusercontent.com',
    'scope': SCOPE
}).then(function () {
    GoogleAuth = gapi.auth2.getAuthInstance();
    GoogleAuth.signOut();
// Listen for sign-in state changes.
    GoogleAuth.isSignedIn.listen(updateSigninStatus);
    // Handle initial sign-in state. (Determine if user is already signed in.)
    var user = GoogleAuth.currentUser.get();
    setSigninStatus();
});

在此过程的稍后,我们检查了用户现在获得了请求范围:

var user = GoogleAuth.currentUser.get();
var isAuthorized = user.hasGrantedScopes(SCOPE);

如果没有,我们会重新检查,以防获取权限延迟。

对不起,如果我还没有提供所有信息,如果您需要更多信息,请告诉我们。

谢谢

让我们看看您的范围

googleapis.com/auth/userinfo.email 
googleapis.com/auth/userinfo.profile 
googleapis.com/auth/plus.me 
googleapis.com/auth/drive.readonly 
googleapis.com/auth/drive.apps.readonly 
googleapis.com/auth/drive 
googleapis.com/auth/plus.profile.agerange.read 
googleapis.com/auth/plus.profile.language.read

我不确定这是否是您问题的原因,但可能没有帮助我认为您应该在此处咨询范围页面

googleapis.com/auth/drive.readonly 
googleapis.com/auth/drive.apps.readonly 
googleapis.com/auth/drive 

驱动器使您可以访问View and manage the files in your Google Drive,这意味着仅读取两个读者是毫无意义的。

这两个也是相同的

googleapis.com/auth/userinfo.profile 
googleapis.com/auth/plus.me 

相同
googleapis.com/auth/plus.login

您可以使用OAuth游乐场来测试您可以访问所需的东西。而不是包括很多额外的范围。

这看起来像是Google结束的变化。

当您请求https://www.googleapis.com/auth/plus.login时,您现在实际收到https://www.googleapis.com/auth/plus.me范围。

复制的步骤:

  1. 打开Google Oaauth 2.0 Playground
  2. 请求https://www.googleapis.com/auth/plus.login范围并交换您的代码以访问令牌。
  3. 获取您的访问令牌并打开此URL:https://www.googleapis.com/oauth2/v1/tokeninfo?alt=json&Access_token= {your_token}
  4. 您现在收到以下范围:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.profile.agerange.read https://www.googleapis.com/auth/plus.profile.language.read https://www.googleapis.com/auth/userinfo.profile
  5. 如果您对https://www.googleapis.com/auth/plus.login进行检查,您的应用程序现在已损坏。

这似乎是最近发生的(在过去的24小时内(,因此可能是Google结束的缺陷或一些无证件的更改。

我们通过对https://www.googleapis.com/auth/plus.me

进行额外检查,在应用程序中添加了一个工作。

希望这会有所帮助。

相关内容

最新更新