googleAuth.isSignedIn.get() returns false hosted in iis but not locally

549 views
Skip to first unread message

andre...@gmail.com

unread,
Nov 17, 2016, 3:00:06 PM11/17/16
to Google API JavaScript Client
Hello!! I have an authorization flow working perfectly on my local ASP.NET Development Server but not working hosted on iis.

here is the code

        $(document).ready(function () {
            gapi.load('client:auth2', initAuth);
        });

        function initAuth() {
            gapi.auth2.init({ client_id: CLIENT_ID, scope: SCOPES, cookie_policy: 'none' }).then(initAuthRes);
        }

        function initAuthRes() {
            var googleAuth = gapi.auth2.getAuthInstance();
            var googleUser = googleAuth.currentUser.get();
            //if (googleAuth.isSignedIn.get()) {
            if (googleUser.isSignedIn()) {
                handleSignedInResult();
            }
        }

hosted on iis both the googleUser.isSignedIn() and googleAuth.isSignedIn.get() methods returns false even if the user is logged in.

Can somebody please give me a hand. Thanks a lot!!!
Reply all
Reply to author
Forward
0 new messages