A super simple 2 factor authentication code (TOTP) generator front-end for oathtool using Bash. Requires installation of oathtool (available from oath-toolkit).
- Install oath-toolkit (
sudo apt install oath-toolkit
) - Run the installation srcipt (
bash install.sh
) - Ensure that
$HOME/.local/bin
is in your PATH variable by adding the following to~/.bashrc
.
export PATH=$HOME/.local/bin:$PATH
Configure your tokens in ~/.bash-2fa/tokens.conf
. Use the existing tempalate for fomatting.
If [token_name] is configured with a key in ~/.bash-2fa/tokens.conf
, running 2fa [token_name]
will return a 2FA code for this token.