{"id":15835185,"url":"https://github.com/krishnagopal-sinha/django-jwt-auth","last_synced_at":"2025-04-01T12:29:26.135Z","repository":{"id":241719922,"uuid":"807504296","full_name":"Krishnagopal-Sinha/django-jwt-auth","owner":"Krishnagopal-Sinha","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-29T08:26:57.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-12T14:28:58.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Krishnagopal-Sinha.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":"2024-05-29T08:21:37.000Z","updated_at":"2024-05-29T08:27:01.000Z","dependencies_parsed_at":"2024-05-29T21:01:14.972Z","dependency_job_id":null,"html_url":"https://github.com/Krishnagopal-Sinha/django-jwt-auth","commit_stats":null,"previous_names":["krishnagopal-sinha/django-jwt-auth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krishnagopal-Sinha%2Fdjango-jwt-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krishnagopal-Sinha%2Fdjango-jwt-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krishnagopal-Sinha%2Fdjango-jwt-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Krishnagopal-Sinha%2Fdjango-jwt-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Krishnagopal-Sinha","download_url":"https://codeload.github.com/Krishnagopal-Sinha/django-jwt-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246639065,"owners_count":20809936,"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":[],"created_at":"2024-10-05T14:21:22.947Z","updated_at":"2025-04-01T12:29:26.116Z","avatar_url":"https://github.com/Krishnagopal-Sinha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Authentication System using Django \u0026 JWT \n\n### Overview\nThis Django project implements user registration, login, and authentication using JSON Web Tokens (JWT). It includes views for user registration, login, retrieving user details, and logging out.\n\n### Requirements\n- Checkout [requirements.txt](./requirements.txt). \n\nNote: This is simple package dump, unneeded pacakges are also included.\n\n### Installation\n\nFollow these steps to get the project up and running on your local machine.\n\n#### 1. Clone the Repository\n\n```sh\ngit clone https://github.com/Krishnagopal-Sinha/django-jwt-auth.git\ncd django-jwt-auth\n```\n\n#### 2. Create and Activate a Virtual Environment\n\n```sh\npython3 -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n#### 3. Install the Required Python Packages\n\n```sh\npip install -r requirements.txt\n```\n\n#### 5. Apply Migrations\n\n```sh\npython manage.py migrate\n```\n\n#### 6. Create a Superuser\n\n```sh\npython manage.py createsuperuser\n```\n\n#### 7. Run the Server\n\n```sh\npython manage.py runserver\n```\n\nHopefully, any other issues can be debugged with help of internet.\n\n### Running the Project\n\n1. **Start the Django development server:**\n\n```sh\npython manage.py runserver\n```\n\n2. **Access the application:**\n\n- Register a new user at `/api/register/`\n- Log in at `/api/login/`\n- View user details at `/api/user/`\n- Log out at `/api/logout/`\n\n### Notes\n\n- Ensure the JWT secret key is kept secure and not hard-coded in the source code. Use environment variables for sensitive information.\n- The JWT token is stored in an HTTP-only cookie to mitigate XSS attacks.\n- This is a first draft thus, probably insecure in few ways, subject to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnagopal-sinha%2Fdjango-jwt-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishnagopal-sinha%2Fdjango-jwt-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnagopal-sinha%2Fdjango-jwt-auth/lists"}