2 ms·
Beware: That shell function will use the secret on a command line, leaking the secret to the process list, available to every user on the system. The oathtool
by teddyh 3y ago
Beware: That shell function will use the secret on a command line, leaking the secret to the process list, available to every user on the system. The oathtool manual page even warns about this.
I would instead recommend something like:
totp() {
oathtool --base32 --totp -- @<(keyring get totp "$1") | xclip
}
(Bash required.)