alexzorin / authy

Go library and program to access your Authy TOTP secrets.
MIT License
800 stars 57 forks source link

Is there any way to import file on Yubico security #7

Open SirMishaa opened 4 years ago

SirMishaa commented 4 years ago

Hello,

I would like to import all my otpauth on my Security Key (yubikey 5ci).

Is there any automatic method for doing this ?

(I used the script and it works well, but maybe it's possible to load directly into the Security Key with kind of api)

alexzorin commented 4 years ago

I've done a little reading about YubiKey Authenticator, and I believe you should be able to use the ykman command.

$ ykman oath uri "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"
$ ykman oath list
Example:alice@google.com

I don't use my Yubikey for TOTP (only for U2F), but maybe you can try modify the script in the README to do something like:

ykman oath uri "$line"

instead of displaying it as a QR code.

If it works for you, I could add it to the README.

SirMishaa commented 4 years ago

Thanks, I'll try and I come back to you if it's works.

nemchik commented 2 years ago

In case anyone finds this in the future, Yubikey 5 series devices only support up to 32 credentials. https://support.yubico.com/hc/en-us/articles/4404456942738-FAQ#what-is-the-yubikey-s-account-limit- If you have more than that number of credentials I believe you would need to use multiple yubikey devices, or consider using something else altogether.