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

"unable to ask for SMS password" when tty is missing #82

Closed
chilek opened this issue Sep 25, 2019 · 10 comments
Closed

"unable to ask for SMS password" when tty is missing #82

chilek opened this issue Sep 25, 2019 · 10 comments
Labels

Comments

@chilek
Copy link
Contributor

chilek commented Sep 25, 2019

I've configured mbank-cli to use mobile app authorization and registered its instance using:

mbank-cli register-device

When I launch mbank-cli manually it does its job as it should, but when it is launched from cronie I've got following output:

mbank-cli: unable to ask for SMS password

Quite strange, because I don't event use sms password for authorization! What's going on?

@chilek

This comment has been minimized.

@chilek chilek closed this as completed Sep 25, 2019
@chilek chilek reopened this Sep 25, 2019
@chilek

This comment has been minimized.

@chilek
Copy link
Contributor Author

chilek commented Sep 25, 2019

As summary:

  1. When we launch script manually we don't have any interaction needs:
$ ./mbank-cli activate-profile business
$
  1. When the same command is launched from cronie we get:
mbank-cli: unable to ask for SMS password

as report from STDERR.

@chilek
Copy link
Contributor Author

chilek commented Sep 25, 2019

I've added --verbose command line parameter to mbank-cli launch from cronie. I'm waiting for new reports.

@jwilk
Copy link
Owner

jwilk commented Sep 25, 2019

There's a sanity check that prevents logging in if stdin is not a tty.
This made sense back when SMS 2FA whas the only option, because without tty there would be no way to complete the login process.

Delete this line a temporary work-around:

_ask_for_sms_password('2006-07-30', 1, 0);

@jwilk jwilk changed the title ask for sms password during launch from cronie "unable to ask for SMS password" when tty is missing Sep 25, 2019
@jwilk jwilk added the bug label Sep 25, 2019
@chilek
Copy link
Contributor Author

chilek commented Sep 25, 2019

thanks, I changed it and wait for next try.

@chilek
Copy link
Contributor Author

chilek commented Sep 26, 2019

I looks like helped!

jwilk added a commit that referenced this issue Sep 26, 2019
With the advent of mobile app 2FA and trusted device registration, users
might want to let mbank-cli log in when there's no tty available (which
would be otherwise needed to enter the SMS password).

#82
@jwilk
Copy link
Owner

jwilk commented Sep 26, 2019

Fixed in 5f2a8bf.

I'll make a new bug-fix release later today.

@chilek
Copy link
Contributor Author

chilek commented Sep 26, 2019

pulled before the moment from master and now it's testing. Thanks!

@jwilk
Copy link
Owner

jwilk commented Sep 26, 2019

Fixed in mbank-cli 2.2.1.

@jwilk jwilk closed this as completed Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants