Questions tagged [djoser]

REST implementation of Django authentication system. Djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation.

REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. It works with custom user model.

Instead of reusing Django code (e.g. PasswordResetForm), we reimplemented few things to fit better into Single Page App architecture.

Requirements

To be able to run djoser you have to meet following requirements:

Python (2.7, 3.4, 3.5, 3.6)
Django (1.11, 2.0, 2.1)
Django REST Framework (3.7, 3.8)

Bear in mind that for Django-2.x you will need at least Python 3.5

Installation

Simply install using pip:

enter code here$ pip install djoser

And continue with the steps described at configuration guide.

Documentation

Documentation is available to study at https://djoser.readthedocs.io and in docs directory.

205 questions
13
votes
2 answers

Simple JWT add extra field to payload data in token

I use djoser and rest_framework_simplejwt. This my user model; class userProfile(models.Model): user=models.OneToOneField(User,on_delete=models.CASCADE,related_name="profile") date_joined=models.DateTimeField(auto_now_add=True) …
uyarc
  • 579
  • 4
  • 17
10
votes
4 answers

Django, Djoser social auth : State could not be found in server-side session data. status_code 400

I'm implementing an auth system with django and react. The two app run respectively on port 8000, 3000. I have implemented the authentication system using the Djoser package. This package uses some dependencies social_core and social_django.…
10
votes
6 answers

Djoser override activation email with template

I've been scouring for more information about how to do this, but there seems to be little to no documentation help. Essentially want I want to do is make a new template for the activation email so the link can start with localhost:3000 instead of…
6
votes
3 answers

How to use a different domain for Djoser email?

How can I change the domain the link inside the email djoser sends uses?
Adrian Gonzalez
  • 737
  • 1
  • 7
  • 20
5
votes
1 answer

Djoser Disable Unused Endpoints

I am using Djoser for authentication in my WebApp and it is pretty fine. However, I'm concerned about some endpoints, like auth/users which returns all users if a token is passed. I won't be using this endpoint and will disable it in frontend as I…
Yazgan
  • 151
  • 11
5
votes
1 answer

Djoser user activation email POST example

I am using the Django rest framework and Djoser for Authentication and User Registration. When a new user registers, Djoser sends an activation email with a link that does a GET request. In order to activate, I need to extract the uid and token from…
leferaycloud
  • 83
  • 1
  • 5
4
votes
2 answers

add expire time for validation and verification in Djoser

I'm using Django==4.0.3 djangorestframework==3.13.1 djangorestframework-simplejwt==5.1.0 djoser==2.1.0 I have used djoser to authenticate, and all works fine. How can add expiration datetime for validation and verification link in Djoser?
oldjoker
  • 55
  • 3
4
votes
0 answers

How do i customize the response gotten from python "djoser" package when creating a user

I had to override the serializer to make some changes, but after successful creation/registration, I want to customize the output Serializer override class RegisterSerializer(UserCreatePasswordRetypeSerializer): first_name =…
Onengiye Richard
  • 348
  • 6
  • 12
4
votes
1 answer

Djoser use a different domain in emails

I have a VueJS/Django rest framework application and working on the confirmation email when a user signup. My frontend is on another URL than my backend so I try to configure djoser to put the activation link with the good domain. I finally managed…
Tartempion34
  • 492
  • 6
  • 23
4
votes
1 answer

(Djoser) Weird activation email when I update the user fields

Every time when I try to update my user with the PATCH method to the /users/me/ endpoint, an activation email is always sent. The user is already active in the system... so I don't know what is happening. SEND_ACTIVATION_EMAIL is True, but I…
Xenetrix
  • 339
  • 2
  • 19
4
votes
1 answer

Djoser - Override registration

I'm confused as to how to modify the registration endpoint for Djoser. All I would like to do is add scoped throttling to the endpoint, but I can't understand how to override it. This page on the docs talks about it:…
Thorvald
  • 546
  • 6
  • 18
4
votes
1 answer

Return appropriate error for unactivated users in Djoser

I am using Django 2.2.14 with the configuration below for Djoser 2.1.0 but when trying to get JWT token for an inactive user, it returns the same error as using a wrong password which makes it tricky to differentiate. I get HTTP STATUS 401 with the…
Manuel
  • 81
  • 7
4
votes
2 answers

How to handle activation url with Django Djoser?

I'm unable to activate users via the activation link. How can I correctly configure the path to process their request? My config: DJOSER = { 'PASSWORD_RESET_CONFIRM_URL': 'api/v1/auth/users/password/reset/confirm/{uid}/{token}', …
user9469766
4
votes
2 answers

Accounts activation with Djoser and Django Rest Framework

Am using Djoser for authentication in my project. Have been struggling to add email activation for over 4 days now but seems have failed to grab it fine as the documentation is a little hard for me to understand. This is my code settings.py #change…
okumu justine
  • 350
  • 6
  • 11
4
votes
1 answer

Djoser with DRF Error username field is required

I am using djoser with django rest framework, and I want to remove the username field from the create user form: settings.py: 'SERIALIZERS': { 'user_create': 'user.serializers.UserRegistrationSerializer', }, serializers.py: class…
Hassam Ali
  • 171
  • 2
  • 12
1
2 3
13 14