smart-2fa-secure
Advanced Two-Factor Authentication system with enhanced security features.
v0.2.4
Python 3.8+
Advanced Two-Factor Authentication system with enhanced security features.
pip install smart-2fa-secure
Advanced Two-Factor Authentication system with enhanced security features.
Customizable code length (default: 6)
Flexible Expiration:
Default 60 seconds expiration
📱 Secure Delivery:
By using this software, you agree to the full disclaimer terms.
Summary: Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
pip install smart-2fa-secure
from smart_2fa_secure import Smart2FA
from smart_2fa_secure.exceptions import InvalidCodeError
smart_2fa = Smart2FA(
redis_host="localhost",
redis_port=6379,
telegram_token="YOUR_BOT_TOKEN",
code_ttl=60,
max_attempts=3,
code_length=6,
)
code = smart_2fa.send_code(user_id="user1", recipient="1234567", message="Your code:")
# Verify with complex code
try:
smart_2fa.verify_code("user123", "A1b2@#")
print("Authentication successful!")
except InvalidCodeError:
print("Invalid security code!")
pip install pytestpip install pytest-covpip install setuptoolspip install wheelpip install buildpip install twine
pytest tests/ -v
pytest tests/ -v --cov=smart_2fa_secure --cov-report=htmlpython -m build or python setup.py sdist bdist_wheeltwine upload dist/*BSD 3-Clause License: See file LICENSE
Copyright (©) 2025, Alexander Suvorov
