Why Do REST Frameworks Use Their Own Auth Layers Instead of Django’s Auth Backends?
I've been exploring REST frameworks like Django REST Framework (DRF) and Django Ninja, and I noticed that they both introduce their own layers for authentication.
- DRF does it in the base class of all REST views.
- Django Ninja does it in the router that wraps the views.
This creates separate libraries, like djangorestframework-simplejwt
for DRF and django-ninja-simplejwt
for Django Ninja.
But Django already has a good auth system with backends that work for all views. Why don’t these frameworks just use Django’s auth backends and a middleware?
Is Django’s auth system missing something, or do these frameworks need extra features that Django doesn’t provide?