9
9
95506682020-07-09 01:16:21
Django
9550668, 2020-07-09 01:16:21

How to do the Authentication process in Django?

Good day to all.

In the process of writing an API (Django restframework) for working with the application, a question arose.

I'm using rest_framework.authtoken to create a token when a user registers. After that, the token is passed to the client, he stores it and can use it to send requests to the server, passing it in the header.
This token is stored in the DB on the server and is verified upon requests.

I was recommended by a front-end developer to add a JWT. Tell me how to properly implement and configure the process? As I understand it, the main token created during registration is stored and can allow authentication for further authorization using JWT tokens. Is it necessary?

In general, I am confused in this process and I ask you to tell me how to tie it all together and whether it is necessary at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Dentist, 2020-07-09
@9550668

Use https://jpadilla.github.io/django-rest-framework-jwt
Everything is in the doc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question