{"id":22666943,"url":"https://github.com/michelereginabora/secure-login","last_synced_at":"2026-06-23T20:32:00.534Z","repository":{"id":167205946,"uuid":"642785122","full_name":"michelereginabora/Secure-Login","owner":"michelereginabora","description":"This project consists of a secure login system developed in Python. The security consists of encryption through the bcrypt, data encryption library and  two factor authentication.","archived":false,"fork":false,"pushed_at":"2023-12-17T21:41:26.000Z","size":100,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T12:06:33.412Z","etag":null,"topics":["api","datasecurity","password","python","security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michelereginabora.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}},"created_at":"2023-05-19T10:41:28.000Z","updated_at":"2025-09-30T06:58:19.000Z","dependencies_parsed_at":"2023-05-23T12:15:34.527Z","dependency_job_id":"967d96af-d238-4b0f-be23-43c181d97fc8","html_url":"https://github.com/michelereginabora/Secure-Login","commit_stats":null,"previous_names":["micheleregina2022/cybersecurityproject","micheleregina2022/secure-login","michelereginabora/secure-login"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michelereginabora/Secure-Login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelereginabora%2FSecure-Login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelereginabora%2FSecure-Login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelereginabora%2FSecure-Login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelereginabora%2FSecure-Login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelereginabora","download_url":"https://codeload.github.com/michelereginabora/Secure-Login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelereginabora%2FSecure-Login/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34706579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["api","datasecurity","password","python","security"],"created_at":"2024-12-09T14:32:36.198Z","updated_at":"2026-06-23T20:32:00.510Z","avatar_url":"https://github.com/michelereginabora.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Secure Login\n\n![GitHub top language](https://img.shields.io/github/languages/top/Micheleregina2022/cybersecurityProject?color=pink\u0026label=PYTHON\u0026logo=python\u0026logoColor=%23cb567c)\n![GitHub](https://img.shields.io/github/license/Micheleregina2022/cybersecurityProject?color=pink)\n\n\n# About project \n\nThis project consists of a secure login system developed in Python. So far, the basic structure of registration and name and password verification has been developed. The first security mechanism consists of encrypting passwords using _bcrypt_, a data encryption library.\nThen two-factor authentication (2FA) was implemented.\n\n\n## Examples\n\n* create_table(): Creates a table in the SQLite database to store user information if the table doesn't exist.\n\n* create_password_hash(passw): Generates an encrypted password hash using the bcrypt library.\n\n* register_user(name, passw, number_phone): Registers a new user in the database, storing the name, encrypted password, and phone number.\n\n* verify_hash_passw(passw, hash_passw): Verifies if a password matches an encrypted password hash.\n\n* verify_user(name, passw): Verifies if the provided username and password correspond to a registered user in the database.\n\n* create_verify_service(): Creates a verification service using the Twilio API and returns the service_sid for the created service.\n\n* send_verification_sms(number_phone): Sends a verification request via SMS to the provided phone number using the Twilio verification service.\n\nFlask Routes:\n\n* /: Initial route that renders the index.html template.\n\n* /register: Route for registering a new user. Form data is extracted and validated before calling the register_user function to insert the user details into the database.\n\n* /verify: Route for authenticating a user. Form data is extracted and verified by calling the verify_user function. If the authentication is successful, a success message is rendered; otherwise, a failure message is displayed.\n\n* /twofactor: Route for performing two-factor authentication (2FA). The phone number and OTP code are extracted from the form.\nThe send_verification_sms function is called to send the verification request via SMS. \nThen, the provided OTP code is verified, and a message indicating whether the verification was approved or failed is rendered.\n\n#### *note: project under development and resolving problems in production*\n\n\n### Interface\nA simple visualization, because the focus is on the backend. \u003cbr/\u003e\n![layout](assets/layout.png)\n\n# Technologies\n\n- Python 3.9.11\n- Librarys Python: sqlite3, bcrypt, flask.render_template, twilio.rest.Client, requests.\n- Framework Flask 2.3.2\n- SQlite 3.35.5.\n- API Twilio\n- DB Browser for SQLite Version 3.12.2\n- IDE PyCharm 2022.3.1 (Community Edition)\n\n\n# How to run the project\n \nMake sure you have Python installed. \nAlso, install Pipenv if you don't already have it by running the following command:\n\n*pip install pipenv*\n\n\u003cbr/\u003e\n\n1. Clone the repository:\n\n    *git clone: https://github.com/Micheleregina2022/cybersecurityProject.git*\n\n\n2. Navigate to the project directory:\n\n    *cd repository-name*\n\n\n3. Install project dependencies using Pipenv:\n\n    *pipenv install --dev*\n\n\n4. Activate the Pipenv virtual environment:\n\n    *pipenv shell*\n\n\n5. Install dependencies:\n\n   *pip install -r requirements.txt*\n\n\n6. Run the application:\n\n    *python app.py*\n\n## Using the API and Testing the Project\n\nTo use the API and test the project, please follow the instructions below:\n\n1. Twilio Account Setup:\n\nIf you haven't already, create a Twilio account at Twilio.com (it's free!).\nRetrieve your Account SID and Auth Token from the Twilio dashboard. \n\n2. Environment Setup:\n\nOpen the app.py file in a text editor.\n\nReplace the values of the account_sid, auth_token, and service_sid variables with your Twilio account information.\n\nOpen the terminal and navigate to the project folder.\n\nStart the server by running the following command:\n\n *python app.py*\n\nThe server will run on port 5000.\n\n3. Using the Project:\n\nOpen your web browser and visit http://localhost:5000 to access the project's home page.\n\nYou will see fields for registration and login.\n\nTo test the two-factor verification, enter your phone number and the OTP (verification code) received via SMS. \n\nBased on the verification, you will receive a message indicating whether access is granted or denied.\n\n\n\n\n\n\n\n# Author\nMichele Regina Bora \u003cbr/\u003e\nhttps://www.linkedin.com/in/michele-regina-bora/\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelereginabora%2Fsecure-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelereginabora%2Fsecure-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelereginabora%2Fsecure-login/lists"}