This Python script implements a basic Two-Factor Authentication (2FA) system using Time-based One-Time Passwords (TOTP). It provides an additional layer of security for user authentication by generating a unique code based on a shared secret and the current time.
- User authentication using a username and password.
- TOTP-based 2FA for enhanced security.
- Secure storage of TOTP secret.
- Simple integration into a desktop login system.
- Python 3.x
- pyotp library
- Clone the repository:
git clone https://github.com/yourusername/2fa-totp-python.git
Install dependencies:
bash pip install -r requirements.txt Run the script:
bash python authenticate.py Follow the prompts to enter your username, password, and TOTP code.
Configuration Adjust the script to integrate with your existing authentication system. Ensure the secure storage of the TOTP secret in a production environment. Contributing Feel free to contribute by opening issues or submitting pull requests.
License This project is licensed under the MIT License - see the LICENSE file for details.
Make sure to customize the URLs, file paths, and other details based on your