Introduced OAUTH2_SCOPE variable for the Oauth2 scope configuration. Fixes #6627

This commit is contained in:
Nico Rikken
2021-08-31 14:36:14 +05:30
committed by Akshay Joshi
parent 620e3a803d
commit d13d2c6dda
5 changed files with 9 additions and 1 deletions

View File

@@ -104,7 +104,9 @@ class OAuth2Authentication(BaseAuthentication):
access_token_url=oauth2_config['OAUTH2_TOKEN_URL'],
authorize_url=oauth2_config['OAUTH2_AUTHORIZATION_URL'],
api_base_url=oauth2_config['OAUTH2_API_BASE_URL'],
client_kwargs={'scope': 'email profile'}
client_kwargs={'scope': oauth2_config.get(
'OAUTH2_SCOPE', 'email profile')},
)
def get_source_name(self):