Skip to content
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

Migrate Garmin authentication to Garth OAuth fixes #128 #129

Merged

Conversation

SimonBaars
Copy link
Contributor

Garmin no longer support auth via the former authentication flow. The Garth library implements authentication via OAuth, which is the recommended methods.

I implemented a solution for this problem in related Python repositories:

For this particular one: I'm personally not a Withings user, so I couldn't end-to-end test the solution. Please test before merging.

For full context, see the relevant issue thread: pe-st/garmin-connect-export#95

Garmin shut down the old authentication flow. The new authentication flow has many security measures in place to script the login. We can use the Garth library to implement an OAuth flow, which should be more robust than the original method.

The OAuth flow also required using the new endpoints (which could be migrated by simply removing the proxy).

Thanks to @geraudloup for investigating this with me, and @app4g for the support!

@stynoo
Copy link
Contributor

stynoo commented Sep 27, 2023

Thanks @SimonBaars , this looks like a clean solution (and maybe the key to avoid the upload of identical weight entries).
iirc requirements.txt & setup.py need to be updated as well.

@SimonBaars
Copy link
Contributor Author

@stynoo Indeed! I committed adding the lib to requirements.txt and setup.py.

Bump version and set it to release major change due to incompatibility
@longstone
Copy link
Collaborator

Thx, I'll create a release.

@longstone longstone merged commit 43f036e into jaroslawhartman:master Sep 28, 2023
@longstone longstone self-assigned this Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants