I see many blogs prefering jwt over session based authentication.
However, django is still session based, and doesn't have option to switch to jwt auth backend.
I think it can be achieved by defining custom JwtMiddleware (whose job is to populate request.user
)
But there's too little online resources describing the process (How add Authenticate Middleware JWT django? is only thing I found)
Is it a frowned upon to do jwt authentication for django views?
*EDIT
I think the reason is (at least for me) there's no way of adding the Auth header
to the page refresh or <a href>
link..
Whereas we could patch Auth header
for axios or like for rest api.