Fix error after variable name refactor
This commit is contained in:
parent
829b454bd9
commit
6825af2981
2 changed files with 2 additions and 1 deletions
|
@ -159,4 +159,5 @@ OAUTH = {
|
||||||
'REDIRECT_URI': f'{BASE_URL}/login/zeus/authorized',
|
'REDIRECT_URI': f'{BASE_URL}/login/zeus/authorized',
|
||||||
'CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', 'tomtest'),
|
'CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', 'tomtest'),
|
||||||
'CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', 'blargh'),
|
'CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', 'blargh'),
|
||||||
|
'REFERER': f'{BASE_URL}/login/zeus/register'
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ def get_access_token(code):
|
||||||
'client_id': settings.OAUTH["CLIENT_ID"],
|
'client_id': settings.OAUTH["CLIENT_ID"],
|
||||||
'client_secret': settings.OAUTH["CLIENT_SECRET"],
|
'client_secret': settings.OAUTH["CLIENT_SECRET"],
|
||||||
'redirect_uri': settings.OAUTH["REDIRECT_URI"]},
|
'redirect_uri': settings.OAUTH["REDIRECT_URI"]},
|
||||||
headers={'Referer': f'{settings.SERVER_URL}/login/zeus/register'})
|
headers={'Referer': settings.OAUTH["REFERER"]})
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
raise OAuthException(
|
raise OAuthException(
|
||||||
f'Status code {response.status_code} when requesting access token.\nresponse: {response.text}')
|
f'Status code {response.status_code} when requesting access token.\nresponse: {response.text}')
|
||||||
|
|
Loading…
Reference in a new issue