django-graphql-jwt
JSON Web Token for Django GraphQL.
Decision gist · record as of 2026-08-14
Yes, if you are building a Django GraphQL API and need JWT authentication. The package is stable (version 0.4.0, Beta status), has no known vulnerabilities, and integrates cleanly with standard Django and graphene patterns. Dormancy is a minor concern—last commit was 2023-12-20—but the code is mature and unlikely to require frequent updates. Not suitable if you need active maintenance or support for very recent Django or Python versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires django, graphene-django, and pyjwt to be installed and configured; Django's AuthenticationMiddleware must be in MIDDLEWARE settings.
- Low friction install with four runtime dependencies (django, graphene-django, graphene, pyjwt).
- Maintenance is dormant—last commit was 2023-12-20—but the repository remains unarchived with 826 stars.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2023-08-04 (1106 days) · last repo commit 2023-12-20 · 826 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 274,134 downloads/mo, #8,193 on PyPI
Alternatives
Verify before relying
pip install django-graphql-jwt
# In Django settings:
MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
]
AUTHENTICATION_BACKENDS = [
"graphql_jwt.backends.JSONWebTokenBackend",
]
# In schema:
import graphene
class Mutation(graphene.ObjectType):
token_auth = graphql_jwt.ObtainJSONWebToken.Field()
verify_token = graphql_jwt.Verify.Field()
refresh_token = graphql_jwt.Refresh.Field()- Whether the package works with Django versions released after 4.2 or Python versions after 3.11.
- Current state of the documentation at https://django-graphql-jwt.domake.io and whether examples remain accurate.
- Whether dormancy affects real-world reliability for new projects or only indicates no active feature development.
What it is and what it does
django-graphql-jwt bridges JWT authentication into Django GraphQL APIs by providing middleware, authentication backends, and GraphQL mutations for token lifecycle management. It integrates with Django's built-in authentication system and graphene to let you issue, verify, and refresh JWTs through GraphQL mutations rather than REST endpoints.
The package handles the plumbing: it adds middleware to extract and validate tokens from request headers, registers a custom authentication backend that Django's permission system recognizes, and exposes three core mutations (obtain, verify, refresh) that clients call to manage their tokens. You configure it by adding middleware to Django settings and mutations to your GraphQL schema, then use standard Django decorators and permission checks on your resolvers.
Use it for
- Secure a GraphQL API by issuing JWTs to authenticated users and requiring tokens on protected queries and mutations.
- Build a single-page app or mobile client that exchanges credentials for a JWT once, then uses the token for subsequent requests.
- Implement token refresh logic so clients can renew expired tokens without re-authenticating.
- Integrate GraphQL authentication with Django's existing user model and permission system.
- Replace REST-based token endpoints with GraphQL mutations for a unified API surface.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a Django GraphQL API and need JWT authentication.
The package is stable (version 0.4.0, Beta status), has no known vulnerabilities, and integrates cleanly with standard Django and graphene patterns. Dormancy is a minor concern—last commit was 2023-12-20—but the code is mature and unlikely to require frequent updates. Not suitable if you need active maintenance or support for very recent Django or Python versions.
Install
django-graphql-jwt on PyPI
Before you install
Low friction install with four runtime dependencies (django, graphene-django, graphene, pyjwt). Maintenance is dormant—last commit was 2023-12-20—but the repository remains unarchived with 826 stars. Suitable for existing projects but expect no active development.
Requires django, graphene-django, and pyjwt to be installed and configured; Django's AuthenticationMiddleware must be in MIDDLEWARE settings.
License in practice
MIT license (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-graphql-jwt
# In Django settings:
MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
]
AUTHENTICATION_BACKENDS = [
"graphql_jwt.backends.JSONWebTokenBackend",
]
# In schema:
import graphene
class Mutation(graphene.ObjectType):
token_auth = graphql_jwt.ObtainJSONWebToken.Field()
verify_token = graphql_jwt.Verify.Field()
refresh_token = graphql_jwt.Refresh.Field()
Verify before relying
- Whether the package works with Django versions released after 4.2 or Python versions after 3.11.
- Current state of the documentation at https://django-graphql-jwt.domake.io and whether examples remain accurate.
- Whether dormancy affects real-world reliability for new projects or only indicates no active feature development.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesdjangographene-djangographenepyjwt |
| Maintenance | Dormant 1,106 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 274,134 / month, #8,193 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 2.0Framework :: Django :: 2.1Framework :: Django :: 2.2Framework :: Django :: 3.0Framework :: Django :: 3.1Framework :: Django :: 3.2Framework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Intended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: SecurityTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: django_graphql_jwt-0.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “jwt authentication django graphql”
- django-graphql-jwtAdds JSON Web Token (JWT) authentication to Django GraphQL APIs,…
- graphene-djangoGraphene-Django bridges Django models and GraphQL APIs, automatically…
- strawberry-graphql-djangoGenerates GraphQL types, queries, mutations, and resolvers…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also python-graphql-client · graphene-django · graphene-file-upload · graphene · djangorestframework-simplejwt · drf-jwt · gql · django-graphiql-debug-toolbar · starlette-graphene3 · pycarlo