login: optional

Kev Dwyer kevin.p.dwyer at gmail.com
Thu Jul 31 01:30:39 EDT 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:
> 
> 
https://developers.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Requiring_login_or_administrator_status
> 
> ...I added:
> 
> login: optional
> 
> ...but that did not seem to make a difference. What am I doing wrong?

Hello,

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

app.yaml


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

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


main.py

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?

Cheers,

Kev






More information about the Python-list mailing list