fix auth.oauth2_callback redirect
This commit is contained in:
parent
5fb7598162
commit
8d0b59c698
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ def oauth2_authorize(provider):
|
||||||
# create a query string with all the OAuth2 parameters
|
# create a query string with all the OAuth2 parameters
|
||||||
qs = urlencode({
|
qs = urlencode({
|
||||||
'client_id': provider_data['client_id'],
|
'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),
|
_external=True),
|
||||||
'response_type': 'code',
|
'response_type': 'code',
|
||||||
'scope': ' '.join(provider_data['scopes']),
|
'scope': ' '.join(provider_data['scopes']),
|
||||||
|
@ -70,7 +70,7 @@ def oauth2_callback(provider):
|
||||||
'client_secret': provider_data['client_secret'],
|
'client_secret': provider_data['client_secret'],
|
||||||
'code': request.args['code'],
|
'code': request.args['code'],
|
||||||
'grant_type': 'authorization_code',
|
'grant_type': 'authorization_code',
|
||||||
'redirect_uri': url_for('oauth2_callback', provider=provider,
|
'redirect_uri': url_for('auth.oauth2_callback', provider=provider,
|
||||||
_external=True),
|
_external=True),
|
||||||
}, headers={'Accept': 'application/json'})
|
}, headers={'Accept': 'application/json'})
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
|
|
Loading…
Reference in a new issue