A simple example of Two-Factor Authentication (2FA) in a Node server.
This example is a single-page application that generates a QR code, scans it with a 2FA app, for example, Google Authenticator, and then verifies the code.
it use the speakeasy to generate the TOTP codes.
if it helps you, please give a star ⭐️
- Clone the repository:
git clone
- Install the dependencies:
npm install
- Start the server:
npm start
- Open your browser and navigate to
http://localhost:1729
.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.