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

Travis build fails in Yeoman Angular generated app

travis-ci compass-sass yeoman-generator

I'm not being able to build an angular application generated with Yeoman using angular-generator. It fails when uses compass gem. I've already added the compass gem installation to the build descri...

Using Ehcache to cache objects from Amazon S3

java amazon-s3 ehcache

I have a huge number of objects on Amazon S3, of which only a small subset are accessed regularly. Thus, I'd really like to make use of a distributed caching system, like Ehcache. (Note, I'd use

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.