login: optional

Kev Dwyer kevin.p.dwyer at gmail.com
Thu Jul 31 07:30:39 CEST 2014

John Bliss wrote:

> Noob here:
> Started new Python project via Google AppEngine which produced project
> files including:
> \app.yaml
> handlers:
> - url: /.*
>   script: main.app
>   secure: always
> Currently, navigating to project root forces me to authenticate with
> Google oAuth2 process. I'd like to turn that off so that I can navigate to
> project root without authenticating. Per:
> ...I added:
> login: optional
> ...but that did not seem to make a difference. What am I doing wrong?


I can't reproduce your problem on the dev server using this minimal setup:


application: test
version: 1
runtime: python27
api_version: 1
threadsafe: true

- url: /.* 
  script: main.app
  secure: always
  login: optional


import webapp2

class IndexHandler(webapp2.RequestHandler):

    def get(self):
        self.response.write('Hello world!')

app = webapp2.WSGIApplication([('/', IndexHandler)], debug=True)

Are you sure that there's nothing in your code or environment that could be 
causing the authentication challenge?



More information about the Python-list mailing list