Last active
January 30, 2020 04:39
-
-
Save thomsh/dc9b3c70a3c02e035142d8d5ca415381 to your computer and use it in GitHub Desktop.
How to generate QR code for Google Authenticator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
NAME="$1" | |
SECRET="$2" | |
exec qrencode -d 300 -s 10 -t ansiutf8 "otpauth://totp/${NAME}?secret=${SECRET}" | |
#PNG #exec qrencode -o /dev/shm/ga.png -d 300 -s 10 "otpauth://totp/${NAME}?secret=${SECRET}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To compute GA:
oathtool --base32 --totp "$SECRET"