Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oauth 2.0 在爱奥尼亚4上与谷歌合作的Oauth2进程陷入困境;请稍等;_Oauth 2.0_Ionic4 - Fatal编程技术网

Oauth 2.0 在爱奥尼亚4上与谷歌合作的Oauth2进程陷入困境;请稍等;

Oauth 2.0 在爱奥尼亚4上与谷歌合作的Oauth2进程陷入困境;请稍等;,oauth-2.0,ionic4,Oauth 2.0,Ionic4,我有一个从github.com/ionicthemes/Ionic-google-login粘贴的教程Ionic 4应用程序,调用的代码如下: this.googlePlus.login({ 'scopes': '', // optional - space-separated list of scopes, If not included or empty, defaults to `profile` and `email`. 'webClientId': enviro

我有一个从github.com/ionicthemes/Ionic-google-login粘贴的教程Ionic 4应用程序,调用的代码如下:

this.googlePlus.login({
      'scopes': '', // optional - space-separated list of scopes, If not included or empty, defaults to `profile` and `email`.
      'webClientId': environment.googleWebClientId, // optional - clientId of your Web application from Credentials settings of your project - On Android, this MUST be included to get an idToken. On iOS, it is not required.
      'offline': true, // Optional, but requires the webClientId - if set to true the plugin will also return a serverAuthCode, which can be used to grant offline access to a non-Google server
    }).then(user => {
      console.log('+++ user is:', user);
    }, err => {
      console.log("+++ google login error:", err);
    })
并且不会打印成功或错误消息。我一直在等待谷歌的回应

我这样做了:
keytool-exportcert-keystore-path to debug或production keystore-list-v
,并在console.developers.google.com上添加了sha1指纹。包名匹配(com.tgm_-ionic),我选择了OAuth2Android流


额外信息:这过去在浏览器平台上工作,但在android模拟器上会失败,错误为10,即“无效受众”。因此,我创建了新凭据,以从浏览器平台移动到android平台(仍然是oauth2),现在我遇到了这个问题。这里的目标是能够在android上登录,而不是在浏览器中。

验证您的WebClient是否正确。您可以在GoogleAPI控制台中引用它,然后查看凭证并检查OAuth2.0客户端ID。通常情况下,在这些混合应用程序中,当需要web客户端ID时,人们会使用android密钥。

验证您的WebClient ID是否正确。您可以在GoogleAPI控制台中引用它,然后查看凭证并检查OAuth2.0客户端ID。通常,使用这些混合应用程序时,人们在需要web客户端ID时会使用android密钥。

-.apps.googleusercontent.com和它的反面是正确的。你确定它是用于web客户端而不是android的吗?-.apps.googleusercontent.com和它的反面,是正确的。你确定它是用于web客户端而不是android的吗?