mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-07-27 15:54:16 +00:00
Completed OAuth change to make the use of the metadata URL setting exclusive to the authorization and token URL settings. If the former is defined, it will be used in preference to the latter.
This commit is contained in:
@@ -20,8 +20,6 @@ def google_oauth():
|
||||
'client_secret': Setting().get('google_oauth_client_secret'),
|
||||
'api_base_url': Setting().get('google_base_url'),
|
||||
'request_token_url': None,
|
||||
'access_token_url': Setting().get('google_token_url'),
|
||||
'authorize_url': Setting().get('google_authorize_url'),
|
||||
'client_kwargs': {'scope': Setting().get('google_oauth_scope')},
|
||||
'fetch_token': fetch_google_token,
|
||||
'update_token': update_token
|
||||
@@ -31,6 +29,9 @@ def google_oauth():
|
||||
|
||||
if isinstance(server_metadata_url, str) and len(server_metadata_url.strip()) > 0:
|
||||
authlib_params['server_metadata_url'] = server_metadata_url
|
||||
else:
|
||||
authlib_params['access_token_url'] = Setting().get('google_token_url')
|
||||
authlib_params['authorize_url'] = Setting().get('google_authorize_url')
|
||||
|
||||
google = authlib_oauth_client.register(
|
||||
'google',
|
||||
|
Reference in New Issue
Block a user