helm/bin/pass-otpuri
2018-01-23 22:51:45 -05:00

12 lines
349 B
Bash
Executable file

#!/usr/bin/env bash
# Interactively generates an OTP-auth url (written for pass-otp)
#
# Example: passotpuri LABEL SECRET [QUERYSTRING]
read -p "Enter the label or issuer:" label
read -p "Enter its OTP secret:" secret
read -p "Enter type (leave blank for totp):" type
echo "otpauth://${type:-totp}/$label?secret=$secret&issuer=${issuer:-$label}"