qrcode for two factor authentication https://gitlab.com/Pacodastre/qrcode
Go to file
Dominique Boucher 3a041ad6d4 TOTP period is 30 seconds
Google Authenticator uses a period of 30 seconds instead of 60.
2015-06-02 21:28:15 -04:00
ebin Fix module name in app file 2015-04-25 16:34:03 -05:00
src TOTP period is 30 seconds 2015-06-02 21:28:15 -04:00
.gitignore Commit of qrcode encoder and supporting modules. 2011-04-10 23:08:14 -05:00
Emakefile Commit of qrcode encoder and supporting modules. 2011-04-10 23:08:14 -05:00
LICENSE Commit of qrcode encoder and supporting modules. 2011-04-10 23:08:14 -05:00
README.markdown Tidy up markdown readme 2011-04-10 23:14:59 -05:00

QR Code Encoder

Reference used was ISO/IEC 18004, 1st Edition (2000)

This implementation is informed by my specific needs, i.e. to provide two-factor authentication for mobile phones running Google Authenticator.

  • "Byte" mode only (don't need e.g. numeric mode or kanji mode).
  • Encode only (no detection/decode).
  • Basic supporting library functions provided (HOTP, PNG image functions) to allow full-cyle demo.

Demo

  1. Download repo and compile with erl -make
  2. Install Google Authenticator App on your mobile:
  3. Run demo: qrcode_demo:run().
  4. Open the generated qrcode.png file
  5. Scan the qrcode into the phone.
  6. Ensure server clock is correct.
  7. The value of qrcode_demo:totp() should show the same passcode as the phone.
  8. Handle PINs/logins for the second part of the "two factor" according to your application design.

NOTE: This documentation is rather basic as this was open-sourced by specific request!