OAuth Bundle API¶
flask_unchained.bundles.oauth
The OAuth Bundle. |
flask_unchained.bundles.oauth.config
flask_unchained.bundles.oauth.services
flask_unchained.bundles.oauth.views
OAuthBundle¶
Config¶
-
class
flask_unchained.bundles.oauth.config.
Config
[source]¶ -
OAUTH_REMOTE_APP_GITHUB
= {'access_token_method': 'POST', 'access_token_url': 'https://github.com/login/oauth/access_token', 'authorize_url': 'https://github.com/login/oauth/authorize', 'base_url': 'https://api.github.com', 'request_token_params': {'scope': 'user:email'}, 'request_token_url': None}¶
-
OAUTH_REMOTE_APP_AMAZON
= {'access_token_method': 'POST', 'access_token_url': 'https://api.amazon.com/auth/o2/token', 'authorize_url': 'https://www.amazon.com/ap/oa', 'base_url': 'https://api.amazon.com', 'request_token_params': {'scope': 'profile:email'}, 'request_token_url': None}¶
-
OAUTH_REMOTE_APP_GITLAB
= {'access_token_method': 'POST', 'access_token_url': 'https://gitlab.com/oauth/token', 'authorize_url': 'https://gitlab.com/oauth/authorize', 'base_url': 'https://gitlab.com/api/v4/user', 'request_token_params': {'scope': 'openid read_user'}, 'request_token_url': None}¶
-
OAuthService¶
-
class
flask_unchained.bundles.oauth.
OAuthService
[source]¶ -
get_user_details
(provider: flask_oauthlib.client.OAuthRemoteApp) → Tuple[str, dict][source]¶ For the given
provider
, return the user’s email address and any extra data to create the user model with.
Optional callback to add custom behavior upon OAuth authorized.
-