fix auth.oauth2_callback redirect

This commit is contained in:
deflax 2024-04-06 17:27:15 +03:00
parent 5fb7598162
commit 8d0b59c698

View file

@ -29,7 +29,7 @@ def oauth2_authorize(provider):
# create a query string with all the OAuth2 parameters
qs = urlencode({
'client_id': provider_data['client_id'],
'redirect_uri': url_for('oauth2_callback', provider=provider,
'redirect_uri': url_for('auth.oauth2_callback', provider=provider,
_external=True),
'response_type': 'code',
'scope': ' '.join(provider_data['scopes']),
@ -70,7 +70,7 @@ def oauth2_callback(provider):
'client_secret': provider_data['client_secret'],
'code': request.args['code'],
'grant_type': 'authorization_code',
'redirect_uri': url_for('oauth2_callback', provider=provider,
'redirect_uri': url_for('auth.oauth2_callback', provider=provider,
_external=True),
}, headers={'Accept': 'application/json'})
if response.status_code != 200: