Fix error after variable name refactor

This commit is contained in:
Midgard 2020-07-25 13:03:47 +02:00
parent 829b454bd9
commit 6825af2981
Signed by: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 2 additions and 1 deletions

View file

@ -159,4 +159,5 @@ OAUTH = {
'REDIRECT_URI': f'{BASE_URL}/login/zeus/authorized',
'CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', 'tomtest'),
'CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', 'blargh'),
'REFERER': f'{BASE_URL}/login/zeus/register'
}

View file

@ -65,7 +65,7 @@ def get_access_token(code):
'client_id': settings.OAUTH["CLIENT_ID"],
'client_secret': settings.OAUTH["CLIENT_SECRET"],
'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:
raise OAuthException(
f'Status code {response.status_code} when requesting access token.\nresponse: {response.text}')