pyg2fa / README.markdown

pyg2fa - Google two factor Authentication


Welcome to g2fa. Google two factor auth for Python based apps.

Repo: $hg clone


  • Clone or download
  • cd to folder
  • sudo python install
  • for test run
    import pyg2fa
  • The test uses YOUR_SECRET_INITIAL_KEY, it should be at least 16, base 32 characters, this is secret, this could be different for different web app users
  • It will print the URL of QR code, Scan it using your Google Authenticator application
  • For testing enter the OTP generated by the Google Authenticator, the python program should print True if everything goes right.
  • make sure time on your comp and on your phone is in sync


  • Clock on server and on android need to be in sync

Recent change:

  • Added validate method which will allow clients clock to drift server time by +/- defined seconds.


  • Developer documents and an demo web application