0

I have a nodejs script which I need to run periodically and it required me to input 6 digits OTP as a part of authentication process. That OTP is generated by hardware yubikey and I need to ope Yubico Authenticator every time I run the script. I was wondering if I can automate the reading process so the script would be able to get that password automatically or when it is inserted or when I touch the key.

I tried to see if I can assign it to one of the slots and it seems like it supports only yubico OTP and does not allow me to use what I have.

I also tried to find if there is a ready solution for that but all related libraries are working with either U2F or a different type of OTP.

PS I can't use other type of OTP, that's the only thing supported by AWS apart from gemalto.

PPS Maybe that 6 digits OTP got a name which I'm not aware of to improve my search results

Leo
  • 1,683
  • 2
  • 20
  • 25

1 Answers1

0

The YubiKey Manager CLI 'ykman otp calculate' command can generate a TOTP code. Would that meet your need?

Feel free to inspect the source code to learn how the command works under the covers.

Luke Walker
  • 333
  • 1
  • 4
  • It looks like in my case I need `ykman oath code` command, is there a simple way to read it via nodejs other than actually running shell command and parsing the output? – Leo Apr 18 '20 at 03:32