A simple command line example that generates a TOTP code in TypeScript in accordance with IETF rfc6238
totp.ts
NAME
totp.ts - generate a TOTP code
SYNOPSIS
totp.ts SECRET
DESCRIPTION
totp.ts generates a TOTP code using the provided SECRET
EXAMPLES
totp.ts Y3BUOUHH4CB7JQNQGYRSTUC5PAHYRJAJ
git clone https://gist.github.com/20f50115ca93b6556c3f75f6c6df1f25.git
cd 20f50115ca93b6556c3f75f6c6df1f25
npx ts-node ./totp.ts Y3BUOUHH4CB7JQNQGYRSTUC5PAHYRJAJ
npx -p https://gist.github.com/pauldougan/20f50115ca93b6556c3f75f6c6df1f25 ./totp.ts Y3BUOUHH4CB7JQNQGYRSTUC5PAHYRJAJ