google-app-engineQuick start with Users Python API, App Engine Authentication


Introduction

Using the Users API is a very simple and flexible way to work the authentication in App Engine, but please make sure that your application cases don't require more elements for the authentication environment.

Note: If you need more information about the traditional structure of an App Engine app, please review this info.

Remarks

The Users API allows:

  • Detect whether the current user has signed in.
  • Redirect the user to the appropriate sign-in page to sign in.
  • Request that your application user create a new Google account if they don't have one already.

Reference and more details


Important elements into the view:

Import:

from google.appengine.api import users

User-object and methods:

user = users.get_current_user()

Note: the implementation of jinja2 is optional, but into the article is used to explaining the completely workflow.