Phonegap Google Login Plugin issue error : 4

蓝咒 提交于 2019-12-11 10:46:52

问题


I am using this plugin : https://github.com/EddyVerbruggen/cordova-plugin-googleplus

I am trying to check as soon as my app opens if the user is already logged in or not. However i am getting an error error : 4.

Also which variable I need to use to check that user is already logged in or not does this code returns something for this?

window.plugins.googleplus.trySilentLogin({

        'scopes': '',
        'offline': true

    },
    function(obj) {

        alert(JSON.stringify(obj));

        alert('YES GOOGLE LOGGED IN');

    },
    function(msg) {

        //outputs error : 4 
        alert('GOOGLE LOGIN error: ' + msg);

    }
);

UPDATE :

However, the

window.plugins.googleplus.login

method works without any issue but the trySilentLogin gives this error code : 4.

UPDATE 2 :

In my app just for testing, first I called login method it returned me the token, then after that i called the trySilentLogin, it also returned me the token, but when i do vice-versa, i.e. first time i call trysilentLogin without calling login method then it says error : 4 and then in next call i called the login method which also gave error : 4

来源:https://stackoverflow.com/questions/49662677/phonegap-google-login-plugin-issue-error-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!