-
Notifications
You must be signed in to change notification settings - Fork 30
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
Garmin Two-Step Verification #41
Comments
Any luck on this one ? this is really required. Some new watches force to have 2FA setup without any way to turn it off. Happy to help in anyways. |
Maybe garth is a better option, it supports MFA. https://github.com/matin/garth#authenticate-and-save-session But my account does not require 2FA, not sure if you need to re-enter the code when the session expires and you need to log in again. |
I was going to suggest garth. I'd been using your https://github.com/svanhoutte/wyze_garmin_sync package, @svanhoutte , but my kids' Garmin Bounce watches require 2FA so I'd been out of luck. Using https://github.com/cyberjunky/python-garminconnect and a tiny version of the example.py script, I was able to modify your connect bash script to use this authentication method while still using your wyze connection/download scripts. |
@ame9895 do you mind sharing what you did ? that sounds promising. |
It’s a bad hack job, but I just removed a bunch of the menu and other features from the example.py, renamed it to scale_upload.py and used this as the main body:
Then in connect_sync.legacy.sh I just replaced the gupload call with:
|
Edit: garth added upload support https://github.com/matin/garth#upload If you just want to upload a fit file and nothing else import os
import sys
import garth
from getpass import getpass
if len(sys.argv) < 2:
print("Use %s <file name>" % sys.argv[0])
exit()
if not os.path.isfile(sys.argv[1]):
print("File %s not found" % sys.argv[1])
exit()
tokens_dir = './tokens'
try:
garth.resume(tokens_dir)
garth.client.username
except:
email = input("Enter email address: ")
password = getpass("Enter password: ")
try:
garth.login(email, password)
garth.save(tokens_dir)
except Exception as exc:
print(repr(exc))
exit()
with open(sys.argv[1], "rb") as f:
garth.client.upload(f) |
@oldnapalm thanks man that was super helpful. I have my script working with 2FA now ! |
@svanhoutte no problem, glad it worked. Since you use the script exit code in connect_sync.sh it's a good idea to run the upload in try and return 1 in case of exception (also change try:
with open(sys.argv[1], "rb") as f:
garth.client.upload(f)
except Exception as exc:
print(repr(exc))
sys.exit(1)
sys.exit(0) |
@oldnapalm Thanks for that, I ll update the script soon on my side. |
Thank you so much for building this program! I recently bought a Garmin device that requires two-step verification (Garmin Bounce watch). Adding two-step unfortunately broke this uploader. Any idea if you'd be able to implement a prompt for entering a 2FA code (Garmin only supports email and SMS, no TOTP)? Garmin does have a "remember device" option, so maybe you'd only have to enter the code one time. Thanks!
The text was updated successfully, but these errors were encountered: