Last active
May 24, 2022 08:16
-
-
Save wjrmffldrhrl/b46ccba687db93ccad2c73a66de6acf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask_appbuilder.security.manager import (AUTH_DB, AUTH_OAUTH) | |
AUTH_TYPE = AUTH_OAUTH | |
OAUTH_PROVIDERS = [ | |
{ | |
"name": "google", | |
"whitelist": [ "@voithru.com" ], | |
"icon": "fa-google", | |
"token_key": "access_token", | |
"remote_app": { | |
"client_id": "********************************.apps.googleusercontent.com", | |
"client_secret": "********************", | |
"api_base_url": "https://www.googleapis.com/oauth2/v2/", | |
"client_kwargs": {"scope": "email profile"}, | |
"request_token_url": None, | |
"access_token_url": "https://accounts.google.com/o/oauth2/token", | |
"authorize_url": "https://accounts.google.com/o/oauth2/auth", | |
} | |
} | |
] | |
# Map Authlib roles to superset roles | |
AUTH_ROLE_ADMIN = "Admin" | |
AUTH_ROLE_PUBLIC = "Public" | |
# Will allow user self registration, allowing to create Flask users from Authorized User | |
AUTH_USER_REGISTRATION = True | |
# The default user self registration role | |
AUTH_USER_REGISTRATION_ROLE = "Jamake" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment