Skip to content

This Python script implements a basic Two-Factor Authentication (2FA) system using Time-based One-Time Passwords (TOTP). The script serves as a simple example and can be integrated into a desktop login system, with considerations for securing the TOTP secret in a production environment.

Notifications You must be signed in to change notification settings

mjrodri/2-Factor-Authentification-with-TOTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Two-Factor Authentication (2FA) with TOTP

Overview

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.

Features

  • 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.

Requirements

  • Python 3.x
  • pyotp library

Usage

  1. 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

About

This Python script implements a basic Two-Factor Authentication (2FA) system using Time-based One-Time Passwords (TOTP). The script serves as a simple example and can be integrated into a desktop login system, with considerations for securing the TOTP secret in a production environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages