显示错误代码:10登录Google for cordova?

时间:2017-11-01 11:53:09

标签: reactjs cordova google-login

我正在开发Cordova应用,需要使用Google登录,我使用了以下Cordova插件https://github.com/EddyVerbruggen/cordova-plugin-googleplus 现在我在Ios上测试了它完美的工作,当它来到Android它显示 警报:错误代码10和卡住和放克.. enter image description here

及其以下用于谷歌登录的代码

googleplusapi() {
       alert("google")
       window.plugins.googleplus.login(

       {
         'scopes': '', // optional, space-separated list of scopes, If not included or empty, defaults to `profile` and `email`.
        'webClientId': '816731629411-rsv37372o75vqu6kdfmd701abmd67el2.apps.googleusercontent.com', // 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
       },
       function (obj) {
         alert(JSON.stringify(obj));
       },
       function (msg) {
         alert('error: ' + msg);
       }


     );

0 个答案:

没有答案