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

Project details


Release history Release notifications

Download files

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

Files for Flask-Sqlalchemy-QueryLog, version 0.0.0
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Sqlalchemy_QueryLog-0.0.0-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size Flask-Sqlalchemy-QueryLog-0.0.0.tar.gz (2.1 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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page