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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Flask-Sqlalchemy-QueryLog-0.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26da386cb9e5e1e0b8649a58aae39c9e5659d197a8a202fec9ca5c95f343c547 |
|
MD5 | e48bc9f11f9e0dde06e63515d1aa72a3 |
|
BLAKE2b-256 | 1b1bca7cef62b426546810accd8c9d372081e19b448b8ea27c619477ff4a69d3 |
Hashes for Flask_Sqlalchemy_QueryLog-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7d5fe2f42672938d362db8a1cac3ea7d99566c3ca3446365ff316707df95f4 |
|
MD5 | ae9e7551562e0220211ecddcf83cdd7d |
|
BLAKE2b-256 | 2dc590a6a6d16a328f1d0ee4eb75945b5502fff43e8bffcab67a4e52aea07c22 |