pyg2fa / README.markdown

g2fa - Google two factor Authentication


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

Repo: $hg clone


  • Clone or download
  • Change YOUR_SECRET_INITIAL_KEY, it should be at least 16, base 32 characters, keep this secret, this could be different for different app users
  • python
  • It will print the info for testing. Most important things are otp and QR code for Google Auth android app
  • User scans this QR code on his mobile which generates OTP on his mobile which you will compare using on your server side


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


  • Will add verify method which will allow clients clock to drift server time by +/- <defined> minutes.