otp 272 B

1234567891011
  1. #!/bin/bash
  2. # @todo: read users ~/.config/totp/totp.sh and forward $1 for specifying service to get totp
  3. if [ -z "TOTP" ]; then
  4. echo "please export TOTP with your authentication code"
  5. exit 1
  6. fi
  7. OTP=$(oathtool --base32 --totp "$TOTP")
  8. echo "$OTP" | wl-copy
  9. echo "$OTP"