I'm trying to write an authentication flow for a command line application that uses Yubikey or TOTP (Authy/Bitwarden). Instead of writing both of these from scratch, or using random libraries (like otplib) I want to use PassportJS since it supports many strategies.
But it seems like it can only be done in a hacky way. Take the following code:
I'm trying to write an authentication flow for a command line application that uses Yubikey or TOTP (Authy/Bitwarden). Instead of writing both of these from scratch, or using random libraries (like
otplib
) I want to use PassportJS since it supports many strategies.But it seems like it can only be done in a hacky way. Take the following code: