The responses recommending usage of Google Charts are absolutely terrible from information security point of view. That’s essentially sharing the TOTP secret as well as your username (alice@google.com
) and issuer (Example
) with a third-party company with no legal obligation to keep them secret, and doing that over a GET
request! Doing so you violate not only every single assumption underlying multi-factor authentication but also most likely your organisation’s information security policy. It nullifies any value added by MFA since the only factor that protects you from compromising your account in case of password breach is itself breached.
Just use any QR code generator as long as it’s processing your data locally.
NEVER USE ONLINE QR GENERATORS FOR MFA SECRETS
On Linux I’d recommend the python-qrcode library that can print your QR code using UTF-8 characters on the console.
pip install qrcode
Then:
qr "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"