{"id":29671454,"url":"https://github.com/smartlegionlab/smart-2fa-secure","last_synced_at":"2025-10-04T04:57:37.253Z","repository":{"id":298413132,"uuid":"999910062","full_name":"smartlegionlab/smart-2fa-secure","owner":"smartlegionlab","description":"Advanced Two-Factor Authentication system with enhanced security features.","archived":false,"fork":false,"pushed_at":"2025-06-12T23:12:27.000Z","size":176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T14:00:40.133Z","etag":null,"topics":["2fa","django","django-2fa","pypi-package","python","python-two-factor-authenticator","secure","security","smartlegionlab","two-factor-authentication"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartlegionlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T01:38:06.000Z","updated_at":"2025-06-12T23:12:31.000Z","dependencies_parsed_at":"2025-06-11T01:41:34.837Z","dependency_job_id":"4fbf1a0b-6772-448f-807d-3597ac68d024","html_url":"https://github.com/smartlegionlab/smart-2fa-secure","commit_stats":null,"previous_names":["smartlegionlab/smart-2fa-secure"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smartlegionlab/smart-2fa-secure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fsmart-2fa-secure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fsmart-2fa-secure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fsmart-2fa-secure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fsmart-2fa-secure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartlegionlab","download_url":"https://codeload.github.com/smartlegionlab/smart-2fa-secure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlegionlab%2Fsmart-2fa-secure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278266895,"owners_count":25958733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2fa","django","django-2fa","pypi-package","python","python-two-factor-authenticator","secure","security","smartlegionlab","two-factor-authentication"],"created_at":"2025-07-22T20:08:14.415Z","updated_at":"2025-10-04T04:57:37.248Z","avatar_url":"https://github.com/smartlegionlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart 2FA Security System \u003csup\u003ev0.2.3\u003c/sup\u003e\n\n---\n\nAdvanced Two-Factor Authentication system with enhanced security features.\n\n---\n\n[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/)\n[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)]()\n[![Security](https://img.shields.io/badge/security-high-brightgreen)]()\n\n![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart-2fa-secure)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart-2fa-secure)](https://github.com/smartlegionlab/smart-2fa-secure/)\n[![GitHub](https://img.shields.io/github/license/smartlegionlab/smart-2fa-secure)](https://github.com/smartlegionlab/smart-2fa-secure/blob/master/LICENSE)\n[![GitHub Repo stars](https://img.shields.io/github/stars/smartlegionlab/smart-2fa-secure?style=social)](https://github.com/smartlegionlab/smart-2fa-secure/)\n[![GitHub watchers](https://img.shields.io/github/watchers/smartlegionlab/smart-2fa-secure?style=social)](https://github.com/smartlegionlab/smart-2fa-secure/)\n[![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/smart-2fa-secure?style=social)](https://github.com/smartlegionlab/smart-2fa-secure/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/smart-2fa-secure?label=pypi%20downloads)](https://pypi.org/project/smart-2fa-secure/)\n[![PyPI](https://img.shields.io/pypi/v/smart-2fa-secure)](https://pypi.org/project/smart-2fa-secure)\n[![PyPI - Format](https://img.shields.io/pypi/format/smart-2fa-secure)](https://pypi.org/project/smart-2fa-secure)\n\n\n\n## Key Security Features\n\n- 🔐 **Complex Code Generation**: \n  - Supports ASCII letters, digits and special characters\n  - Customizable code length (default: 6)\n  \n- ⏱ **Flexible Expiration**:\n  - Adjustable TTL (Time-To-Live) for codes\n  - Default 60 seconds expiration\n\n- 📱 **Secure Delivery**:\n  - Telegram integration with customizable message templates\n\n## Installation\n\n```bash\npip install smart-2fa-secure\n```\n\n## Advanced Usage\n\n```python\nfrom smart_2fa_secure import Smart2FA\nfrom smart_2fa_secure.exceptions import InvalidCodeError\n\nsmart_2fa = Smart2FA(\n  redis_host=\"localhost\",\n  redis_port=6379,\n  telegram_token=\"YOUR_BOT_TOKEN\",\n  code_ttl=60,\n  max_attempts=3,\n  code_length=6,\n)\ncode = smart_2fa.send_code(user_id=\"user1\", recipient=\"1234567\", message=\"Your code:\")\n\n# Verify with complex code\ntry:\n    smart_2fa.verify_code(\"user123\", \"A1b2@#\")\n    print(\"Authentication successful!\")\nexcept InvalidCodeError:\n    print(\"Invalid security code!\")\n\n```\n\n## 💻 Information for developers:\n\n- `pip install pytest`\n- `pip install pytest-cov`\n- `pip install setuptools`\n- `pip install wheel`\n- `pip install build`\n- `pip install twine`\n\n- `pytest tests/ -v`\n- `pytest tests/ -v --cov=smart_2fa_secure --cov-report=html`\n- `python -m build` or `python setup.py sdist bdist_wheel`\n- `twine upload dist/*`\n\n\n---\n\n![LOGO](https://github.com/smartlegionlab/smart-2fa-secure/raw/master/data/images/cov.png)\n\n---\n\n## Disclaimer of liability:\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n***\n\n## Copyright:\n    --------------------------------------------------------\n    Licensed under the terms of the BSD 3-Clause License\n    (see LICENSE for details).\n    Copyright © 2018-2025, A.A. Suvorov\n    All rights reserved.\n    --------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlegionlab%2Fsmart-2fa-secure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartlegionlab%2Fsmart-2fa-secure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlegionlab%2Fsmart-2fa-secure/lists"}