Skip to main content

A personal package

Project description

A personal package.

Initialization

dance = DanceGoogleAuth() dance.init_app(app, 'index') OR dance = DanceGoogleAuth(app, 'index')

Set login_handler

def login_handler(email, name): session['user_email'] = email session['user_name'] = name return True dance.set_login_handler(login_handler)

Signin/out Route

dance.signin_url() dance.signout_url()

Decorator Requiring

@dance.login_required() @dance.auth_required(lambda: session.get('user_email') == 'abc@gmail.com')

Complete Protect

dance.all_login_required() dance.all_auth_required(lambda: session.get('user_email') == 'abc@gmail.com')

Required Env

GOOGLE_OAUTH_CLIENT_ID GOOGLE_OAUTH_CLIENT_SECRET OAUTHLIB_RELAX_TOKEN_SCOPE=True OAUTHLIB_INSECURE_TRANSPORT=True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Dance-Google-Auth, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Dance_Google_Auth-0.0.3-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size Flask-Dance-Google-Auth-0.0.3.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page