...

/

Adding the Login Feature

Adding the Login Feature

Learn to implement the user login feature using JWT authentication.

We'll cover the following...

We are now sure that the endpoint behaves as we wish. The next step is adding the login endpoint following the same process: writing the serializer and the viewset, and then registering the route.

The login feature will require the email or the username with the password. Using the djangorestframework-simplejwt package, which provides a serializer called TokenObtainPairSerializer, we’ll write a serializer to check for user authentication but also return ...