Private
Public Access
1
0

strava working with correct scope

This commit is contained in:
Sander Roosendaal
2018-11-26 20:33:18 +01:00
parent 6877626cd8
commit 9e77b348b1
9 changed files with 30 additions and 7 deletions

View File

@@ -216,6 +216,8 @@ def imports_get_token(
if 'grant_type' in oauth_data:
if oauth_data['grant_type']:
post_data['grant_type'] = oauth_data['grant_type']
if 'strava' in oauth_data['autorization_uri']:
post_data['grant_type'] = "authorization_code"
else:
grant_type = post_data.pop('grant_type',None)
@@ -265,7 +267,7 @@ def imports_make_authorization_url(oauth_data):
params = {"client_id": oauth_data['client_id'],
"response_type": "code",
"redirect_uri": oauth_data['redirect_uri'],
"scope":"write",
"scope":oauth_data['scope'],
"state":state}