-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve authentication by migrating to Garth #102
Comments
@matin great work on garth. what sort of hoops did you have to go thru to get to use oAuth tokens? In fact, how did you get these tokens? tx |
@app4g it was a painful process. GH is probably not the best forum to go into the details. It was worth it though. The code and consumer key and secret can be used by everyone for personal use. Let me know if I can be helpful in the integration. |
I opened a PR that implements this solution: #104 |
Thanks for looking into this. Apologies for not being very responsive (my time to spend on this is very limited at the moment). It sounds sensible to use a more stable authentication flow, if such a thing exists for GarminConnect. Using another library like garth to handle the authentication could be an option, alternatively borrowing it's principles. I skimmed it's source code and got tripped up here. A request is made for https://thegarth.s3.amazonaws.com/oauth_consumer.json which contains: {
"consumer_key": "fc3e99d2-118c-44b8-8ae3-03370dde24c0",
"consumer_secret": "E08WAR897WEy2knn7aFBrvegVAf0AFdWBBF"
} I'm a bit concerned about (1) relying on some "random" (well) Internet endpoint (that may not be forever present) that (2) seems to hardcode an authentication secret. Would someone knowledgable mind explaining? |
Garth maintainer here. The keys in S3 are the same ones used by the latest version of the Garmin Connect Android app. Mobile app endpoints like this now work: It's unlikely but possible Garmin could update the keys. Keeping the keys in S3 (vs hardcoding) means they can be updated without requiring a library version upgrade. |
Thanks for stopping by. 🙂
How does one get hold of those? |
I will stick to the "browser-impersonating" authentication approach for the time being. |
Garth uses the same API as the mobile app for login and request authentication. It's as close as we can get to proper Garmin Connect API. The migration eliminates the need for Cloudscraper.
Garth ...
garminconnect has already been migrated.
I'm happy to write the PR if you're interested in making the change.
The text was updated successfully, but these errors were encountered: