What is the difference between Token Authentication and JWT in the context of a Django backend?
Last updated
DRF TokenAuthentication is stateful: an opaque random key in the
authtokentable maps to a user. Each request does a DB lookup, revocation is just deleting the row, and tokens don't expire by default.JWT is stateless: signed claims (user id, expiry) are verified cryptographically with no DB hit. It has built-in expiry, but early revocation needs refresh tokens or a blocklist (e.g.
djangorestframework-simplejwt).
- https://www.geeksforgeeks.org/python/django-interview-questions/
- https://foysalff.medium.com/12-advanced-django-interview-questions-for-experienced-developers-dbe654e21a45
- https://www.careers360.com/courses-certifications/articles/django-interview-questions-and-answers
- https://www.interviewbit.com/django-interview-questions/
- https://www.youtube.com/watch?v=OuBUUkQfBYM
- https://www.placementpreparation.io/blog/django-interview-questions-for-freshers/