yitsushi / totp-cli

Authy/Google Authenticator like TOTP CLI tool written in Go.

Home Page:http://yitsushi.github.io/totp-cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not generate OTP when using "." in account name

sunpoet opened this issue · comments

% totp-cli add-token test foo@bar.com
Token:
Password: ***

% totp-cli list test
Password: ***
test.foo@bar.com

% totp-cli generate test.foo@bar.com
Password: ***
Account not found

The failure is actually caused by "." in account name, not "@".

Would it be simpler to have consistent usage?
"namespace account" is used for add-token.
"namespace.account" is used for other commands.

I guess "." is acceptable if the former format is used among all commands.

I was thinking about removing the . separator and simply use them as a different parameter instead, but because I never tried to use . in account names I never felt the urge to do it.

@sunpoet : v1.1.1 is available with these changes. You can't use the update command for it because the update was updated to use tar.gz instead of raw executable (without compression).

Nothing changed about stored data and how it reads them only the command parsing.

@yitsushi Thanks, it works fine!
I use email address as account which contains dots.