You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When combining JWTAuth from django-jwt-auth with django_auth, if the latter precedes the former in the auth=[] parameter, calls using Bearer auth fail on "detail: CSRF check Failed". When inverting the order, both work.
api = NinjaExtraAPI(
title="My API",
csrf=False,
docs=Swagger(),
docs_decorator=login_required,
docs_url="/swagger",
auth=[JWTAuth(), django_auth], # working
renderer=ORJSONRenderer(),
urls_namespace="api",
)
while auth= [django_auth,JWTAuth()] generates the csrf error.
Versions (please complete the following information):
Python version: 3.12.2
Django version: 5.0.4
Django-Ninja version: 1.1.0
Django-Ninja-JWT version: 5.3.0
Pydantic version: 2.64
The text was updated successfully, but these errors were encountered:
Describe the bug
When combining JWTAuth from django-jwt-auth with django_auth, if the latter precedes the former in the
auth=[]
parameter, calls using Bearer auth fail on "detail: CSRF check Failed". When inverting the order, both work.while
auth= [django_auth,JWTAuth()]
generates the csrf error.Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: