TOTP Example.

Usage

0. Install library

pip install -r requirements.txt

1. Generate secret key

python generate-key.py
# => B3DQULIS7BASNVU2ZLYTZGU4NU7YNVF5

2. Generate QR Code

python qrcode-generate.py B3DQULIS7BASNVU2ZLYTZGU4NU7YNVF5

see: qrcode.png

This QR code can be read by the following apps.

  • Google Authenticator
  • Microsoft Authenticator

3. Check TOTP code

python totp-example.py B3DQULIS7BASNVU2ZLYTZGU4NU7YNVF5
421697
692918 (sleep 30 sec...)
823269 (sleep 30 sec...)
088076 (sleep 30 sec...)
...