{"id":15783750,"url":"https://github.com/deepmancer/flask-authentication-service","last_synced_at":"2026-02-18T07:02:08.347Z","repository":{"id":163432963,"uuid":"342792545","full_name":"deepmancer/flask-authentication-service","owner":"deepmancer","description":"Simple Flask-based authentication service providing user login, registration, and token management with MongoDB integration.","archived":false,"fork":false,"pushed_at":"2024-08-16T11:28:38.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T20:04:30.280Z","etag":null,"topics":["async","flask","flask-application","jwt-authentication","mongodb","python3","simple-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepmancer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-02-27T06:58:05.000Z","updated_at":"2024-08-24T23:13:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"13264e8e-9394-4166-848a-bffe1b1f50dd","html_url":"https://github.com/deepmancer/flask-authentication-service","commit_stats":null,"previous_names":["alirezaheidari-cs/authentication-service","deepmancer/authentication-service","deepmancer/flask-authentication-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fflask-authentication-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fflask-authentication-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fflask-authentication-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fflask-authentication-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepmancer","download_url":"https://codeload.github.com/deepmancer/flask-authentication-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243554556,"owners_count":20309954,"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","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":["async","flask","flask-application","jwt-authentication","mongodb","python3","simple-project"],"created_at":"2024-10-04T20:01:01.112Z","updated_at":"2026-02-18T07:02:08.307Z","avatar_url":"https://github.com/deepmancer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Simple Flask Authentication Service\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Flask-000000.svg?style=for-the-badge\u0026logo=Flask\u0026logoColor=white\" alt=\"Flask\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/MongoDB-47A248.svg?style=for-the-badge\u0026logo=MongoDB\u0026logoColor=white\" alt=\"MongoDB\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54\" alt=\"Python\"\u003e\n\u003c/p\u003e\n\nWelcome to your new go-to Flask-based authentication service! This streamlined solution offers a robust foundation for mastering authentication essentials. With built-in features like user login, registration, token management, and MongoDB integration, it’s designed to be user-friendly and versatile.\n\n---\n\n### 🌟 Key Features\n\n- **🔐 User Login:** Securely authenticate users with password verification.\n- **📝 User Registration:** Effortlessly create new user accounts.\n- **🎫 Token Generation:** Issue secure tokens upon successful login for access control.\n- **⏳ Token Expiration:** Manage token validity to enhance security.\n- **🌍 Language Agnostic:** Seamlessly integrates with projects in any programming language.\n- **💾 MongoDB Integration:** Uses MongoDB and an Object-Document Mapper (ODM) for reliable data persistence.\n\n### 🚀 Getting Started\n\n#### 📋 Prerequisites\n\nEnsure you have the following:\n\n- Python 3.6 or later ([Download Python](https://www.python.org/))\n- Flask web framework ([Check Flask](https://flask.palletsprojects.com/))\n- MongoDB database ([Explore MongoDB](https://www.mongodb.com/))\n\n#### 🏃‍♂️ Running the Service\n\n1. **Clone the Repository:**\n\n    ```bash\n    git clone https://github.com/your-username/flask-authentication-service.git\n    ```\n\n2. **Navigate to the Project Directory:**\n\n    ```bash\n    cd flask-authentication-service\n    ```\n3. **Install Dependencies:**\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. **Start the Server:**\n\n    ```bash\n    python server.py\n    ```\n\n5. **Access the Service:**\n   Your authentication service will be available at `localhost:9999` (port is customizable).\n\n### 📡 API Endpoints\n\n| **Method** | **Path**                    | **Description** |\n|------------|-----------------------------|-----------------|\n| `POST`      | `/login`                    | Login a user and obtain a token (provide `id` and `password` in the request body). |\n| `POST`      | `/register`                 | Register a new user (provide `id` and `password` in the request body). |\n| `POST`      | `/getUserIdWithToken`       | Retrieve the user ID associated with a specific token (provide `token` in the request body). |\n| `POST`      | `/isTokenExpired`           | Check if a token has expired (provide `token` in the request body). |\n\n### 💡 Example Usage (with cURL)\n\n**Login:**\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"id\": \"your_user_id\", \"password\": \"your_password\"}' http://localhost:9999/login\n```\n\n**Register:**\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"id\": \"new_user_id\", \"password\": \"new_user_password\"}' http://localhost:9999/register\n```\n\nFeel free to explore, customize, and make this service your own. Happy coding! 😄\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Fflask-authentication-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepmancer%2Fflask-authentication-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Fflask-authentication-service/lists"}