All Questions
Tagged with django django-rest-framework-simplejwt
315
questions
0
votes
0
answers
7
views
Error while trying to connect Django With ReactNative
I am building a React Native app with Django as the backend. I have set up the login screen in React Native and configured JWT authentication with rest_framework_simplejwt in Django. However, I ...
0
votes
0
answers
16
views
How to check a generate code by simply-jwt
I try to verify a code generate by simply-jwt, but the second step when I tried to verify this, it's become False and I try to understand why
the purpose it's to generate a code after login and verify ...
0
votes
0
answers
23
views
Get "RuntimeError: Event loop is closed" while running pytest in django channels
I wrote a test for my websocket connection.
Here is my pytest code.
import pytest
from channels.testing import WebsocketCommunicator
from django.contrib.auth import get_user_model
from ...
0
votes
0
answers
13
views
How to implement a mobile_no to be passed inorder to access tokens and not the default username and password
I'm not using password, by default simplejwt requires a default user so it prompts me for username, password and mobile_no - but I only want to user mobile no.
I tried to override the ...
0
votes
0
answers
59
views
ModuleNotFoundError: No module named 'rest_framework_simplejwt'
I am experiencing an issue with rest_framework_simplejwt when I try to run migrations in my Django project. The error I encounter is:
ModuleNotFoundError: No module named 'rest_framework_simplejwt'
I ...
0
votes
1
answer
42
views
How to customize the message for inactive user in Djoser?
I am working on a Django project and I am using Djoser as my auth library. However, when a user is trying to create a jwt token it returns
{
"detail": "No active account found with ...
0
votes
1
answer
63
views
Simple JWT says sometimes "Token is invalid or expired" and sometimes gives correct output
I have a Django REST backend configured Simple-JWT solution. About 2/3 of the requests return #
{"detail":"Given token not valid for any token type","code":"...
0
votes
0
answers
20
views
Google Authentication with Django and Flutter
I created a mobile app called Dermalens, which tests whether a skin lesion is benign or not. The app is developed using Flutter for the frontend and Django for the backend. When a user signs in from ...
0
votes
1
answer
23
views
In django DRF using JWT, why does postman properly block access to some views but they are available from my Angular front-end without authentication?
I’m trying to restrict access to some views of my API using Django Rest Framework and simpleJWT https://django-rest-framework-simplejwt.readthedocs.io/
The issue I’m facing is that postman correctly ...
0
votes
0
answers
52
views
How can we get custom token from dj-rest-auth while authentication?
We are trying to use dj_rest_auth to make social authentication, starting with Google auth, work on a site / app using JWT token pair (access & refresh). Our attempted solution is as follows:
Goal:...
0
votes
0
answers
72
views
How to set custom JWT Authentication in django using dj-rest-auth
I have setup a backend JWT authentication system using django, dj-rest-auth and simpleJWT. I want a custom JWT token returned from the server to be used as the Bearer token.
Currently, the dj-rest-...
0
votes
1
answer
129
views
Getting 401 unauthorised when trying to access JWT authenticated page in Django even after generating token
I'm a student trying to teach myself JWT authentication. I created a basic log in page and after logging in the user should see a welcome page that says Welcome {username}.
However even after logging ...
0
votes
0
answers
27
views
Token authentication in django (rest_framework) not working in production environment but works in local machine
when I test my view with a proper token in my local machine it works properly but when I test the view in a production environment with a proper token too I get
{
"detail": "...
0
votes
0
answers
24
views
DRF Simple JWT functions RefreshToken.for_user(user) get Attribute error with Custom User Model
I create a custom User Model with usercode is PrimaryKey
class User(AbstractBaseUser, PermissionsMixin):
usercode = models.CharField(primary_key=True, unique=True, null=False)
username = ...
0
votes
0
answers
35
views
Django multi tenant help required
I am currently building saas app using django_multitenant package and i read and followed all the detail given in the docs and while using Django admin panel everything is fine. If we create any ...