584 questions
0
votes
0
answers
59
views
DRF allauth email authentication unique constraint failed
I am trying to implement an email authentication with djangorestframework, dj-rest-auth and allauth.
Here is my custom user model
class CustomUser(AbstractBaseUser, PermissionsMixin):
email = ...
0
votes
2
answers
205
views
how to show user in TokenSerializer dj-rest-auth
I'm trying to return UserSerializer after successful login through dj-rest-auth.
I followed the steps that were told in
After login the `rest-auth`, how to return more information?
which has a similar ...
0
votes
1
answer
214
views
dj-rest-auth/login doesn't work with 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework_simplejwt.authentication.JWTAuthentication',], in postman
I am not an expert of setting up the settings file in DRF. I want to use React and DRF for authentication and this is my code
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
...
0
votes
2
answers
247
views
"detail": "Authentication credentials were not provided." when trying to access list view as admin. Django REST framework
I have this simple view I built using Django REST framework:
class ProductListCreateAPIView(
StaffEditorPermissionMixin,
generics.ListCreateAPIView):
queryset = Product.objects....
0
votes
1
answer
443
views
Django - Exclude URL from Django REST API Documentation? Using drf-yasg
How do I remove the path below from my API documentation with my current code?
path('users/reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view()),
I don't want this path to be ...
0
votes
1
answer
54
views
Django Rest Auth and Google Auth - Google does not store username and email
Currently I have a registration with Django Rest Auth where I implement a login with Google under an extended user model with AbstractUser, the problem is that when authenticating with Google, when ...
1
vote
1
answer
119
views
Deserialization/Serialization in Django rest framework and the SOLID principles
I am interested in understanding which pattern of the below is more aligned with the SOLID principles.
Say We have a class CreateView(generics.CreateAPIView) in Django Rest Framework.
Option 1: Single ...
1
vote
2
answers
638
views
DJANGO REST API - How do I restrict user access to API?
So I’ve been putting together a REST API using William Vincent’s REST API’s with Django book.
I have everything up and going according to the book but I’m a bit of a noob so I need some clarification ...
1
vote
1
answer
280
views
404 Error When Verifying Email in Dj-Rest-Auth
I'm developing an authentication API for a mobile app using dj-rest-auth in Django. After a user registers an account, a verification email is sent to the user with an activation key. However, when I ...
1
vote
1
answer
81
views
Authenticating with drango rest framework
I am just learning django and drf. I created a django app which authenticates user and i used default django views for it. (I made my own signup view as i needed to add user image). Now ive been asked ...
1
vote
0
answers
383
views
Django rest framework, can not logout
I am using django restframework with TokenAuthentication. So if I go for example to this api call:
http://192.168.1.67:8000/api/categories/
Then the user has to login. But when I trigger the logout ...
1
vote
1
answer
232
views
Django Rest Framework Password Rest Confirm Email not showing Form and returning as none
In my Django Rest Framework, the users request to reset the password and when the email is received and the link is clicked, the url
password-reset-confirm/<uidb64>/<token>/ as comes up ...
0
votes
1
answer
423
views
How to fix dj-rest-auth sending invalid password rest links
In my Django Rest Framework, the users request to reset the password and when the email is received everytime the link is clicked it shows a message Password reset unsuccessful The password reset link ...
0
votes
1
answer
1k
views
How to use both simple jwt token authentication and BasicAuthentication?
I have an DRF api and I have implemented the simplejwt authentication system. It works well. It is usefull when I want to connect my api from external script (I don't need to store credential and just ...
0
votes
1
answer
760
views
djangorestframework-simplejwt not working
I'm following a Udemy Course with user administration and I need to install this
pip install djangorestframework-simplejwt
After its installed, I need to add this to settings.py
REST_FRAMEWORK = {
...