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


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
Filename, size Flask-Sqlalchemy-QueryLog-0.0.0.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page