GMail API: Authentication required twice

I'm running a app on Google App Engine which connects to the GMail API. In general this all works fine, however I have noticed that if I start a completely new session, the authorization is asking for authorization twice. Once from Google App Engine (see image below), and once through the regular Consent Screen as I would expect. What is initiating the first authorization and is there any way I can get rid of it?

My code for authorization:

decorator = OAuth2Decorator(client_id=settings.CLIENT_ID,
                    client_secret=settings.CLIENT_SECRET,
                    scope=settings.SCOPE)

class gmailAuth(webapp2.RequestHandler):
 @decorator.oauth_aware
 def get(self):
    if decorator.has_credentials():
      self.response.out.write('success')
    else:
      self.redirect(decorator.authorize_url())

Answers


I've figured out that the @decorator.oauth_aware refers to the Google Account API, which I am not using. This is what is causing the screen to appear. That means that since I am using webapp2 authentication, I will have to refer to the non-GAE specific API authentication.


Need Your Help

There is an entry for table "stores", but it cannot be referenced from this part of the query

ruby-on-rails postgresql activerecord

I want to select latest 4 deals from my stores, with has_and_belongs_to_many relationship, and Im getting this error:

What other frameworks should ASP.Net programmers consult for code inspiration?

.net asp.net

What other frameworks should ASP.Net programmers consult for code inspiration?