页面刷新后如何防止Google注销?

时间:2019-06-24 18:57:35

标签: javascript jquery oauth-2.0 google-signin

我使用以下源代码来集成google sign。

    <meta name="google-signin-client_id" content="397716624167-qkrenp3c7e81a7br3pop83e90le6eslr.apps.googleusercontent.com">


<script type="text/javascript">
                var name = undefined;
                var picture = undefined;
                var email = undefined;
                function renderButton() {

            gapi.signin2.render('gSignIn', {
                'scope': 'profile email',
                'onsuccess': onSuccess,
                'onfailure': onFailure
                });
}
      function onSuccess(googleUser) {
        var profile = googleUser.getBasicProfile();
            name  = profile.getName();
            picture = profile.getImageUrl();
            email = profile.getEmail();
            }

问题是页面刷新后我的页面被注销。如何防止其退出。

0 个答案:

没有答案
相关问题