This is a simple login demonstration system with two-factor authentication functionality.
- Clean homepage design
- Login page
- Two-factor authentication (TOTP)
- User dashboard
- Clone or download this repository
- Open the
index.htmlfile with a web browser - Click the "Sign in" button
- Log in using the following credentials:
- Username:
test - Password:
test123
- Username:
- Use an authenticator app (like Google Authenticator, Microsoft Authenticator, etc.) to scan the QR code or manually enter the secret key to get the verification code
- TOTP URI:
otpauth://totp/e2etest1?secret=AUECVMFUWYMYUX5F - Secret Key:
AUECVMFUWYMYUX5F
- TOTP URI:
- Enter the 6-digit verification code generated by your authenticator app
- After successful verification, you will be redirected to the user dashboard
- HTML5
- CSS3
- JavaScript (Vanilla)
- jsSHA (for TOTP verification)
This is a demonstration project and should not be used in a production environment. The verification logic is implemented on the frontend, and there are no real backend security measures.
index.html- Home pagelogin.html- Login page2fa.html- Two-factor authentication pagedashboard.html- Dashboard pagestyles.css- Stylesheetscript.js- Common JavaScript functionslogin.js- Login page logic2fa.js- Two-factor authentication logicdashboard.js- Dashboard page logic