Flask-GoogleAuth

Super simple OpenID and Google Federated Auth for Flask apps
Download

Flask-GoogleAuth Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Alexander Saltanov
  • Publisher web site:
  • http://github.com/sashka/

Flask-GoogleAuth Tags


Flask-GoogleAuth Description

Flask-GoogleAuth is a partial port of torando.auth to be used with Flask.Inspired by Kenneth Reitz.UsageExample 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 Flaskfrom flask_googleauth import GoogleFederated# Setup Flaskapp = Flask(__name__)app.secret_key = "random secret key"# Setup Google Federated Authauth = GoogleFederated(app, "heroku.com")@app.route("/")@auth.requireddef secret(): # Once user is authenticated, his name and email are accessible as # g.user.name and g.user.email. 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)@app.route("/")@auth.requireddef secret(): return "You have rights to be here, %s" % g.user.nameInstallTo install Flask-GoogleAuth:pip install flask-googleauthProduct's homepage


Flask-GoogleAuth Related Software