django-rest-framework-simplejwt

How do I get the JWT tokens from user in Django RestFramework

How do I get the JWT tokens from user in Django RestFramework Question: I have a DRF project using Simple-JWT for authentication. When a user logs in, they get a response containing the access and refresh tokens in the serializer.data. However: When testing on the Apis I can manually copy and paste these tokens and …

Total answers: 1

How to solve the djongo.exceptions.SQLDecodeError: while trying to run the migrate command

How to solve the djongo.exceptions.SQLDecodeError: while trying to run the migrate command Question: I am creating a DjangoRestful app that uses SimpleJWT for authentication. When I try to add the Blacklist app and make migrations. i.e: py manage.py migrate as suggested in the documentation, I get the error below: Operations to perform: Apply all migrations: …

Total answers: 2

Simple JWT Usage

Simple JWT Usage Question: I have my Django backend authentication working (tested using curl and postman), but something eludes me. When sending test requests, the docs show username and password data being sent: curl -X POST -H "Content-Type: application/JSON" -d ‘{"username": "davidattenborough", "password": "boatymcboatface"}’ http://localhost:8000/api/token/ But, if I try to send an email and password …

Total answers: 1

How to solve error 401 unauthorized login in DRF simple jwt user login

How to solve error 401 unauthorized login in DRF simple jwt user login Question: I am creating DRF authentication APIs for Abstract Base users in my Django project and using simple JWT. The registration and email verification APIs work fine, but when I try to log in using the credentials of a valid user, I …

Total answers: 2