{"id":29953695,"url":"https://github.com/sahilverse/django-authentication-example","last_synced_at":"2026-05-06T17:35:26.956Z","repository":{"id":307536607,"uuid":"1020007339","full_name":"sahilverse/Django-Authentication-Example","owner":"sahilverse","description":"A comprehensive Django REST Framework authentication example implementing JWT (JSON Web Token) authentication with a custom user model. This project demonstrates best practices for building secure authentication systems in Django applications.","archived":false,"fork":false,"pushed_at":"2025-07-31T17:49:44.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T20:46:23.043Z","etag":null,"topics":["authentication","django","django-rest-framework","postgresql","swagger"],"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/sahilverse.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-07-15T07:46:40.000Z","updated_at":"2025-07-31T17:49:47.000Z","dependencies_parsed_at":"2025-07-31T20:46:25.141Z","dependency_job_id":"f3021f69-8a0c-46be-bb38-710135629aa9","html_url":"https://github.com/sahilverse/Django-Authentication-Example","commit_stats":null,"previous_names":["sahilverse/django-authentication-example"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sahilverse/Django-Authentication-Example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FDjango-Authentication-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FDjango-Authentication-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FDjango-Authentication-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FDjango-Authentication-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahilverse","download_url":"https://codeload.github.com/sahilverse/Django-Authentication-Example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahilverse%2FDjango-Authentication-Example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32704645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["authentication","django","django-rest-framework","postgresql","swagger"],"created_at":"2025-08-03T15:10:41.926Z","updated_at":"2026-05-06T17:35:26.948Z","avatar_url":"https://github.com/sahilverse.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Django Authentication Example\n\nA comprehensive Django REST Framework authentication example implementing JWT (JSON Web Token) authentication with a custom user model. This project demonstrates best practices for building secure authentication systems in Django applications.\n\n### Features\n\n- Custom User model using email as the primary identifier\n- JWT (JSON Web Token) based authentication\n- REST API endpoints for user management\n- Email-based authentication \n- CORS support for frontend integration\n- API documentation with Swagger/OpenAPI\n- Secure password handling\n- PostgreSQL database support\n\n### Technologies Used\n\n- Django 5.2.4\n- Django REST Framework 3.16.0\n- djangorestframework-simplejwt 5.5.0\n- PostgreSQL (via psycopg2-binary)\n- django-cors-headers 4.7.0\n- drf-yasg (for API documentation)\n- python-decouple (for environment variables)\n\n### Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/sahilverse/Django-Authentication-Example.git\ncd Django-Authentication-Example\n```\n\n2. Create and activate a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use: venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n4. Create a `.env` file in the root directory with the following variables:\n```\nDJANGO_SECRET_KEY=your_secret_key_here\nDEBUG=True\n\nUSE_POSTGRES=True\nDB_ENGINE=your.db.engine.here\nDB_NAME=your_db_name_here\nDB_USER=your_db_user_here\nDB_PASSWORD=your_db_password_here\nDB_PORT=your_db_port_here\nDB_HOST=your_db_host_here\n\n```\n\n5. Run migrations:\n```bash\npython manage.py migrate\n```\n\n6. Create a superuser:\n```bash\npython manage.py createsuperuser\n```\n\n7. Run the development server:\n```bash\npython manage.py runserver\n```\n\n### API Endpoints\n\n- `POST /api/user/register/`: Register a new user\n- `POST /api/user/login/`: Login and obtain JWT tokens\n- `POST /api/user/token/refresh/`: Refresh JWT token\n\nFor complete API documentation, visit `/` or `/redoc/` after running the server.\n\n### Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### Acknowledgments\n\n- Django documentation\n- Django REST Framework documentation\n- JWT authentication best practices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahilverse%2Fdjango-authentication-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahilverse%2Fdjango-authentication-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahilverse%2Fdjango-authentication-example/lists"}