{"id":13572313,"url":"https://github.com/flavors/django-graphql-jwt","last_synced_at":"2025-05-15T01:05:31.250Z","repository":{"id":26711624,"uuid":"109591551","full_name":"flavors/django-graphql-jwt","owner":"flavors","description":"JSON Web Token (JWT) authentication for Graphene Django","archived":false,"fork":false,"pushed_at":"2023-12-20T11:55:00.000Z","size":1140,"stargazers_count":822,"open_issues_count":71,"forks_count":179,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-12T13:53:07.686Z","etag":null,"topics":["authentication","django","graphene","graphql","jsonwebtoken","jwt","oauth2","token"],"latest_commit_sha":null,"homepage":"https://django-graphql-jwt.domake.io","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/flavors.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-05T15:29:56.000Z","updated_at":"2025-05-08T13:21:59.000Z","dependencies_parsed_at":"2024-06-08T00:44:00.577Z","dependency_job_id":"5a7e6e83-025f-444d-8d26-0fe0484f9909","html_url":"https://github.com/flavors/django-graphql-jwt","commit_stats":{"total_commits":483,"total_committers":24,"mean_commits":20.125,"dds":"0.10559006211180122","last_synced_commit":"0debe4fbd5299e394ee253e6fa77e7a68b3236ba"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavors%2Fdjango-graphql-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavors%2Fdjango-graphql-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavors%2Fdjango-graphql-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavors%2Fdjango-graphql-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flavors","download_url":"https://codeload.github.com/flavors/django-graphql-jwt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254039,"owners_count":22039792,"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":["authentication","django","graphene","graphql","jsonwebtoken","jwt","oauth2","token"],"created_at":"2024-08-01T14:01:19.862Z","updated_at":"2025-05-15T01:05:31.211Z","avatar_url":"https://github.com/flavors.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://django-graphql-jwt.domake.io/\"\u003e\u003cimg width=\"420px\" src=\"https://django-graphql-jwt.domake.io/_static/logo.png\" alt='Django GraphQL JWT'\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    JSON Web Token authentication for Django GraphQL.\n    \u003cbr\u003eFantastic \u003cstrong\u003edocumentation\u003c/strong\u003e is available at \u003ca href=\"https://django-graphql-jwt.domake.io\"\u003ehttps://django-graphql-jwt.domake.io\u003c/a\u003e.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/flavors/django-graphql-jwt/actions\"\u003e\n        \u003cimg src=\"https://github.com/flavors/django-graphql-jwt/actions/workflows/test-suite.yml/badge.svg\" alt=\"Test\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/flavors/django-graphql-jwt\"\u003e\n        \u003cimg src=\"https://img.shields.io/codecov/c/github/flavors/django-graphql-jwt?color=%2334D058\" alt=\"Coverage\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.codacy.com/gh/flavors/django-graphql-jwt/dashboard\"\u003e\n        \u003cimg src=\"https://app.codacy.com/project/badge/Grade/4f9fd439fbc74be88a215b9ed2abfcf9\" alt=\"Codacy\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/django-graphql-jwt\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/v/django-graphql-jwt.svg\" alt=\"Package version\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nInstall last stable version from Pypi:\n\n```sh\npip install django-graphql-jwt\n```\n\nAdd `AuthenticationMiddleware` middleware to your *MIDDLEWARE* settings:\n\n\n```py\nMIDDLEWARE = [\n    # ...\n    \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n    # ...\n]\n```\n\nAdd `JSONWebTokenMiddleware` middleware to your *GRAPHENE* settings:\n\n```py\nGRAPHENE = {\n    \"SCHEMA\": \"mysite.myschema.schema\",\n    \"MIDDLEWARE\": [\n        \"graphql_jwt.middleware.JSONWebTokenMiddleware\",\n    ],\n}\n```\n\nAdd `JSONWebTokenBackend` backend to your *AUTHENTICATION_BACKENDS*:\n\n```py\nAUTHENTICATION_BACKENDS = [\n    \"graphql_jwt.backends.JSONWebTokenBackend\",\n    \"django.contrib.auth.backends.ModelBackend\",\n]\n```\n\n## Schema\n\nAdd *django-graphql-jwt* mutations to the root schema:\n\n```py\nimport graphene\nimport graphql_jwt\n\n\nclass Mutation(graphene.ObjectType):\n    token_auth = graphql_jwt.ObtainJSONWebToken.Field()\n    verify_token = graphql_jwt.Verify.Field()\n    refresh_token = graphql_jwt.Refresh.Field()\n\n\nschema = graphene.Schema(mutation=Mutation)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavors%2Fdjango-graphql-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflavors%2Fdjango-graphql-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavors%2Fdjango-graphql-jwt/lists"}