apicrud.auth.oauth2_func¶
oauth2_func
created 29-mar-2021 by richb@instantlinux.net
Functions
|
Initiate OAuth2 login |
|
Register the OAuth2 providers specified in AUTH_PARAMS config. |
-
apicrud.auth.oauth2_func.
login
(oauth_reg, method, nonce=None)¶ Initiate OAuth2 login
- Parameters
oauth_reg (obj) – pre-registered oauth object (from initialize.py)
method (str) – provider name
nonce (str) – a nonce check value
-
apicrud.auth.oauth2_func.
oauth2_init
(app)¶ Register the OAuth2 providers specified in AUTH_PARAMS config. The client-id and client-secret params must be specified as environment variables, in the form GOOGLE_CLIENT_ID.
- Parameters
app (obj) – the flask object