skip to navigation
skip to content

Flask-GoogleAuth 0.1

Super simple OpenID and Google Federated Auth for Flask apps.

Latest Version: 0.4.2

This is a partial port of torando.auth to be used with Flask.

Inspired by Kenneth Reitz.


Example usage for Google Federated Login.

Require an account from a given Google Apps domain for your Flask apps.

Greate for internal apps.

from flask import Flask
from flask_googleauth import GoogleFederated

# Setup Flask
app = Flask(__name__)
app.secret_key = "random secret key"

# Setup Google Federated Auth
auth = GoogleFederated(app, "")

def secret():
    # Once user is authenticated, his name and email are accessible as
    # and
    return "ssssshhhhh (c) kennethreitz"

If you want to authenticate your users with general Google OpenID you should import and use GoogleAuth instead of GoogleFederated:

auth = GoogleAuth(app)

def secret():
    return "You have rights to be here, %s" %


To install Flask-GoogleAuth:

pip install flask-googleauth


Be sure that your Google Apps domain is enabled to be an OpenID provider under “Advanced tools” → “Federated Login using OpenID”.

File Type Py Version Uploaded on Size
Flask-GoogleAuth-0.1.tar.gz (md5) Source 2012-07-06 4KB