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
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue