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
3
votes
2 answers

Problem of signature with webauthn on django with djoser

I'm working at the moment on an implementation of webauthn on a project. The main point is to give the possibility to user to use FaceId or fingerprint scan on their mobile on the website. I tried the djoser version of webauthn but I wanted to give…
thelittlewozniak
  • 368
  • 1
  • 8
  • 21
3
votes
3 answers

"detail": "Authentication credentials were not provided." for general views

I have created a custom user model and apply Djoser authentication and jwt. But after this when I tried to get request for products views, I get this error: "detail": "Authentication credentials were not provided." Here is the screenshot: Here is…
3
votes
1 answer

Why can't I retrieve user data from Djoser user endpoint

So I'm testing my djoser url endpoints from djoser almost every endpoints worked but I cant get the user from /users/me/, I'm using JWT and and here's my postman headers I got the JWT from the login process but it still returns an error as…
Melly
  • 675
  • 8
  • 24
3
votes
1 answer

How long does it take for a Djoser access token until expire?

So Djoser JWT provided an access token when you login, how long until that token expires?
Melly
  • 675
  • 8
  • 24
3
votes
2 answers

Djoser not sending emails when default emails are overridden

I have a DRF project that uses Djoser for authentication. The plan is to override Djoser's default activation email and send something an HTML template email. Here's what I have: # settings.py DJOSER = { "SEND_ACTIVATION_EMAIL": True, …
Caspian
  • 633
  • 1
  • 10
  • 29
3
votes
1 answer

Djoser simplejwt authentication forbidden(403) while sending JWT to auth/users/me/

I am using djoser and simplejwt for authentication and authorization. When I send a post request for authentication to endpoint http://localhost:8000/auth/jwt/create/ it responds with access and refresh token, and again when I pass the…
nickname
  • 45
  • 5
3
votes
2 answers

django-rest-auth vs djoser, Which one to use for Social Authentication?

I am unable to understand which one is better to use between django-rest-auth and djoser. Previously I was using django-rest-auth but it is now unmaintained. I wanted to use jwt support for authentication. I also wanted to perform Social…
Aniket Singla
  • 555
  • 1
  • 5
  • 20
3
votes
1 answer

How do I explicitly specify language of email I want to send?

I have a custom user model that have a preferred_language field. I want all the emails (activation and password reset) to be sent translated to the language that user specified in profile. class CustomUser(AbstractBaseUser, PermissionsMixin): …
Vassily
  • 5,263
  • 4
  • 33
  • 63
3
votes
1 answer

Djoser for DRF with Knox tokens

I'm trying to use djoser with token authentication, but using django-rest-knox tokens. I have set the TOKEN_MODEL to knox.models.AuthToken, and the rest framework's DEFAULT_AUTHENTICATION_CLASSES to knox.auth.TokenAuthentication. I naïvely thought…
Alex
  • 2,270
  • 3
  • 33
  • 65
3
votes
3 answers

Send activation code by email after registration instead of URL

As we seen in different websites, After user's sign-up it sends an activation code with 6/5 character to user's email. User should submit the code in the website to activate their account. I am trying to do the same thing but can't figure it out how…
2
votes
4 answers

How to solve Django : ModuleNotFoundError: No module named 'djoser'

I have installed djoser on my Django project, however , for some reason, It will not find djoser and throw : "ModuleNotFoundError: No module named 'djoser'" You can see djoser is on my settings.py installed apps and it's installed on my venv, which…
Simao
  • 371
  • 2
  • 13
2
votes
0 answers

Password reset confirmation link redirects to page not found 404

DJOSER = { 'LOGIN_FILED': 'email', 'USER_CREATE_PASSWORD_RETYPE': True, 'USERNAME_CHANGED_EMAIL_CONFIRMATION':True, 'PASSWORD_CHANGED_EMAIL_CONFIRMATION':True, 'SEND_CONFIRMATION_EMAIL':True, …
2
votes
0 answers

why post request on djoser /users endpoint from httpurlconection in android app returns 401 error?

I have an API which allows post request to register new users. I'm using djoser library for authentication in the API. It works in browser but when I try making this post request in my android project.I get 401 unauthorized response, I don't know…
2
votes
2 answers

createsuperuser gives KeyError after implementing custom user

Hey I'm fairly new to Django and I'm trying to setup a pretty basic rest API. I am using djoser to handle authentication. However I want to use a custom user model. Where 1. the unique field is the email (instead of username) and 2. it is has one…
wardz
  • 349
  • 2
  • 10
2
votes
1 answer

Stop djoser from adding API url to the frontend url set in PASSWORD_RESET_CONFIRM_URL

I have a DRF API using djoser to handle password reset. The password reset workflow is working well except for the PASSWORD_RESET_CONFIRM_URL When I set my frontend page URL in that setting for Djoser it keeps concatenating the API URL to the…
Jordan Rob
  • 322
  • 2
  • 16
1
2
3
13 14