abrander / garmin-connect

Golang client for the (unoffical reverse engineered) Garmin Connect API
MIT License
136 stars 29 forks source link

Fix authentication error: social profile not found in HTML #5

Closed davidkroell closed 3 years ago

davidkroell commented 3 years ago

Garmin changed their API some time back, so the authentication had to be changed.

I've got a bug report in this issue davidkroell/bodycomposition#10.

Thanks to @kochka, who came up with a solution to the same problem in is his own project, so i just copied it over. https://github.com/kochka/WeightLogger/commit/4973711aa92326b527066227f561fed32e076483#diff-5e915b6d9fa63aa88cec51ef4c31a83b6e068acb8389ce66563bae1e35d91694

Kind regards, David

abrander commented 3 years ago

Thanks for the PR - nice catch and solution.

I'll merge right away if you remove the unneeded parameters. Only service, gauthHost, generateExtraServiceTicket and the new generateTwoExtraServiceTickets are needed.

Nice idea splitting the URL into multiple lines, it makes it much more readable, maybe we should move service too..?

abrander commented 3 years ago

This looks awesome! I'll merge right away. Thanks! :smiley: