jotta / jotta-cli-issues

45 stars 1 forks source link

2fa (from App) Login fails "incorrect code" #87

Closed mcguffin closed 5 years ago

mcguffin commented 5 years ago

jotta-cli release (jotta-cli version):

-------------------------------------------
jottad executable : /usr/bin/jottad
jottad appdata    : /var/lib/jottad
jottad version    : 0.5.15025
jotta-cli version : 0.5.15025
-------------------------------------------

Description of problem: The two factor athentication code from app does not work.

$ jotta-cli login
[...]
accept license (yes/no): y
username: <MY_EMAIL_ADDRESS>
password: 
two factor authentication code: XXXXXX
Incorrect code
OK

jotta-cli status (jotta-cli status):

ERROR  Not logged in

Relevant logs for the issue (cat ~/.jottad/jottabackup.log)

No such file or directory

Additional info:

mcguffin commented 5 years ago

Supplement: Trying to set up a connection with app provided OTP in rclone resulted in the following error message:

$ rclone config
[...]
Your Jottacloud password is only required during setup and will not be stored.
password: 
2019/08/03 13:53:24 Failed to get resource token: HTTP error 400 (400 Bad Request) returned body: "{\"error\":\"invalid_client_or_otp_missing_or_wrong\",\"error_description\":\"Client authentication failed (e.g., unknown client, no client authentication included, unsupported authentication method, or the resource owner has enabled OTP and the otp code is not supplied in the password grant request or the supplied otp code is wrong).\"}"

(Please note: rcrypt didn't ask for an OTP. The error occured right after I entered my password)

Using an SMS-OTP everything worked as expected.

Kimbsen commented 5 years ago

We are aware of the problem with OTP and jotta-cli. This happened because we moved to a new auth system internally which supports OTP, but jotta-cli is still on the old auth-system and only supports sms 2fa.

We will release a new jotta-cli that supports the new system shortly. Probably a week or two. Just need to finish some internal testing.

mcguffin commented 5 years ago

Thanks for letting me know! Looking forward to the next release.

Kimbsen commented 5 years ago

We just released 0.6 which changes the login flow. You now need to generate a personal login token when logged in on jottacloud.com and use this in place of username/password when logging into jotta-cli.

mcguffin commented 5 years ago

Awesome, Thanks!