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
File details
Details for the file Flask-Dance-Google-Auth-0.0.6.tar.gz
.
File metadata
- Download URL: Flask-Dance-Google-Auth-0.0.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0114018b087ccd7659d52b47b09d37976a9063493d905283831443b24cb56301 |
|
MD5 | e54e2aac33dbe99a09f8104c21e19ec7 |
|
BLAKE2b-256 | c96fc7ca17ff0d63e1781b5167b8a67f7f33bd2e79e64569fae3a0df8a8b1d42 |
File details
Details for the file Flask_Dance_Google_Auth-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: Flask_Dance_Google_Auth-0.0.6-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03336da9d232419eec26fd7704430fc8b19ee2a2fb2e0c54c2ccad669d0afe72 |
|
MD5 | 11ae57c07415ed09f9b881f3b3c6538a |
|
BLAKE2b-256 | e122ea3fc5c2070f866fb3227ca23cde5053bdfdb4915cb1a33e9c6c1641c27c |