yitsushi / totp-cli

Authy/Google Authenticator like TOTP CLI tool written in Go.
http://yitsushi.github.io/totp-cli/
MIT License
227 stars 25 forks source link

Feature request: Display time until code invalidation #88

Closed maddsua closed 8 months ago

maddsua commented 8 months ago

I think it should be reasonably easy to print time in seconds that a code will still be valid, something that Google Authenticator displays with that pie icon.

Some providers will allow for a few seconds of 'delay', but the other would outright reject a code.

So the output would be something like:

totp-cli generate namespace account
Password: ***
889840 | 25s
yitsushi commented 8 months ago

Available in v1.7.0.

❯ go run . generate --show-remaining namespace account
Password: ***
465669 (remaining time: 26s)
maddsua commented 8 months ago

Available in v1.7.0.

❯ go run . generate --show-remaining namespace account
Password: ***
465669 (remaining time: 26s)

Great! Didn't see it in the embedded help command and so I've assumed that it just isn't there

yitsushi commented 8 months ago

It wasn't there, it's there only since v1.7.0, which contains only the #89 pull request. So it's fresh and awesome from today :laughing: