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.

Source Distribution

Flask-Sqlalchemy-QueryLog-0.0.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

Flask_Sqlalchemy_QueryLog-0.0.0-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page