1

I'm new to Django and curious how the authentication of Rest Framework works.

So as I understand, the flow of authentication is: Frontend sends request with username and password > Backend (Django) sends back token > From then on frontend send this token in header to authenticate.

But because anyone can see the header I send, so how is this safe?

1 Answer 1

1

For this to be secure you should only ever authenticate over an https connection. When using an https connection the header/token/cookie/whatever will be encrypted.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.