dblock / slack-strava

(Re)Post Strava activities to Slack
https://slava.playplay.io
MIT License
37 stars 6 forks source link

There was an authorization problem when users uncheck "View data about your private activities" #84

Open dblock opened 4 years ago

dblock commented 4 years ago

image

cat strava-bot/web.00.log | grep -i "Authorization Error" | grep user_name | wc -l
36

cat strava-bot/web.00.log | grep -i "Authorization Error" | grep user_name | cut -f2 -d'=' | cut -f1 -d',' | sort | uniq | wc -l
12

when connecting to Strava we are asked for "share public activities" (mandatory) and "share private activities" (optional but pre-checked)

happens with share private activities unchecked

dblock commented 4 years ago

We are asking for activity:read_all scope, but the user can uncheck the box that effectively allows that, revoking reading private activities. Then we call athleve_activities and Stava gets confused and fails with an access denied. Looks like a Strava bug.

https://groups.google.com/forum/#!topic/strava-api/ePwOlVNYUfY

dblock commented 4 years ago

For now asking users to make sure to leave the "View data about your private activities" box checked when reconnecting their Strava accounts.

https://github.com/dblock/slack-strava/commit/3fa9659b551fe62aed8dde700526420cc6d38534