title: g-signin2 is not working with webapp2 (google app engine, users.get_current_user())
body: <p>So, this is the sample python code:</p>
  
  <pre><code>import webapp2
  from google.appengine.api import users
  
  class HomePage(webapp2.RequestHandler):
      def post(self):
         #getting the email through a http call from the frontend
          email = json.loads(self.request.body).get("email")
          user = users.get_current_user()
          print "incoming: ", email, user
  </code></pre>
  
  <p>The "email" prints correct signed-in user (which implies my g-signin2 is working) but "user" variable is null (which implies webapp2 is not understanding who's logged in)</p>
  
  <p>Following is my HTML code:</p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt;
  &lt;meta name="google-signin-scope" content="profile email"&gt;
  &lt;meta name="google-signin-client_id"
        content="&lt;myclientid&gt;.apps.googleusercontent.com"&gt;
  
  &lt;google-sign-in-button button-id="uniqueid" options="options"&gt;&lt;/google-sign-in-button&gt;
  </code></pre>
  
  <p>Following is my angular directive (mostly irrelevent to this problem, but anyway just adding this to be sure):</p>
  
  <pre><code>app.controller('GoogleCtrl', ['$http', '$scope', function ($http, $scope) {
  
  $scope.signOut = function () {
      var auth2 = gapi.auth2.getAuthInstance();
      auth2.signOut().then(function () {
          console.log('User signed out.');
      });
  };
  
  $scope.options = {
      'onsuccess': function (response) {
          console.log(response);
          var profile = response.getBasicProfile();
          data = {
              id: profile.getId(),
              name: profile.getName(),
              imageUrl: profile.getImageUrl(),
              email: profile.getEmail()
          }
          $scope.commsApp(data)
      }
  }
  
  
  //communication
  $scope.commsApp = function (data) {
      console.log("sendToApp; data: ", data);
      $http({
          method: 'POST',
          url: '/',
          data: data
      })
          .then(function successCallback(response) {
                  console.log("success. response: ", response);
  
              },
              function errorCallback(response) {
                  console.log("failure. response: ", response);
              });
      };
  }]);
  </code></pre>
  
  <p>I'm able to pass on the profile information to my backend that is obtained when the user logs in through g-signin2 default button. But, when I use users.get_current_user(), I don't get any profile information. How do I get this working?</p>