This project is a simple implement of 2 factor authentication using time-based one-time password.
Install Google Authneticator app. (iPhone / Android)
Scan QR code below. This QR code has example user's key for generating one-time password.
If it is difficult to scan QR code, please enter account and key directly.
account | arbitrary name |
key | NBSWY3DP |
NBSWY3DP
is a Base32 encoded value of hello
.
When you finished set up, 6 digits code will be generated every 30 seconds.
make run
Access to localhost:8080 and try to login.
You will be required to enter one-time password after id/password login. Then, enter one-time password shown in Google Authenticator.
id | hogehoge |
password | hogehoge |
- Resynchronization
- Preventing CSRF attacks