Questions tagged [dj-rest-auth]
78 questions
3
votes
1 answer
dj-rest-auth/registration return http 204 no content
I were following the book Django for APIs by William.S.Vincent. In Chapter 8: User Authentication, I make Implementing token authentication and use dj-rest-auth and django-allauth to make registration. In the book after register the http return 201…

Dũng Nguyễn Văn
- 69
- 9
3
votes
1 answer
dj_rest_auth (jwt) refresh token is empty when login - django rest framework
im having a trouble with dj_rest_auth jwt package. when i signup for a new account it gives me both access token and refresh token in response, but when i try to login with credentials, all i get is access token, and refresh token is entirely…

Morteza
- 45
- 3
3
votes
1 answer
How can I get 'sign in with Google' to work using 'dj_rest_auth'?
I'm trying to implement Google sign in using DRF and dj_rest_auth.
I've set up 'django-allauth' with Google as provider and the sign in process works in the web browser.
I need to connect an android app with my backend. I've created API endpoints…

AllStack
- 33
- 1
- 4
3
votes
1 answer
How to serialize a CountryField from django-countries?
I'm trying to add the CountryField to a serializer for the Register process (using dj-rest-auth) and can't find the correct way to implement it.
All the answers I found just say to use what the documentation says, but that doesn't help for me, maybe…

Risker
- 358
- 3
- 15
2
votes
1 answer
Dj Rest Auth custom registration not working
I am using DJ-REST-AUTH for user registration API. I want the first_name and last_name to show in the API endpoint however right now it is just showing the default.
I have tried to configure the settings and create CustomRegisterSerializer. I read…

Macto24
- 79
- 6
2
votes
1 answer
What is the use of token return after login or registration from django-rest-knox?
Hy there,
I work on project where I used django-rest-knox for token authentication. I have doubt that
1.How token be used that has return while registering and login.
(
when i pass token in postman as like,
in header section
Authentication Token…

BHUWAN PANDEY
- 43
- 6
2
votes
1 answer
AttributeError: module 'BackendApp.views.GoogleLogin' has no attribute 'as_view'
path('dj-rest-auth/google/', GoogleLogin.as_view(), name='google_login'),
AttributeError: module 'BackendApp.views.GoogleLogin' has no attribute 'as_view'
I have this error coming from url.py which is weird as I am following this guide…

Ryan
- 356
- 1
- 6
- 26
2
votes
2 answers
Dj rest auth using JWT Token stored in HttpOnly cookies
I'm making a Django Rest Framework application with a JWT authentication with tokens stored in HttpOnly cookies. Authentication is performed via reading the access cookie. I'm using a dj-rest-auth library for this purpose, but I'm a little confused…

Pavel Paranin
- 76
- 1
- 7
2
votes
0 answers
How to execute Google social authentication using dj-rest-auth in React JS
I am following this 2-part tutorial of using dj-rest-auth in django part 1 - part 2 by: Mohamad Fadhil and I have no problem with the backend in Django but I was wondering if anyone could show me how to implement this on react instead of…

Jonathan Aplacador
- 113
- 8
1
vote
0 answers
I wrote a middleware that handles refreshing the access token if expired but it is not properly working, (I use DRF combined with simple jwt )
from datetime import datetime, timezone
from rest_framework_simplejwt.tokens import RefreshToken
from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class TokenRefreshMiddleware(MiddlewareMixin):
def…

Bif_Titan
- 11
- 1
1
vote
0 answers
Browser ignores Set-Cookie from backend server
This has been asked countless times, yet I am unable to find a solution that works.
When using Axios I found that it (Chrome/the browser) appears to ignore Set-Cookie headers under some circumstances. I am working with a Django backend running…

sherrellbc
- 4,650
- 9
- 48
- 77
1
vote
1 answer
TypeError at /dj-rest-auth/google/ string indices must be integers
I wanted to do social authentication using dj-rest-auth with google. But getting an error like this doesn't understand anything.
I want the advice of the experienced.
I tried after submitting the access token it will return me a key for…

DevXhub
- 21
- 3
1
vote
1 answer
Google OAuth Login in DRF application raise Invalid token type
I had implemented Google OAuth in my DRF application using all-auth and dj-rest-auth, but for some reason stop working.
Traceback shows the JWT, but for some reason, allauth raise this
raise DecodeError(f"Invalid token type. Token must be a…

Matheus Lopes
- 11
- 3
1
vote
1 answer
Error "ImproperlyConfigured at /dj-rest-auth/login/" in use "dj_rest_auth"
I Want Use packeage 'dj_rest_auth' in django-rest-framework for login but get error:
ImproperlyConfigured at /dj-rest-auth/login/
No default throttle rate set for 'dj_rest_auth' scope
In setting.py File:
INSTALLED_APPS = [
...
# 3rd Party
…

pooya
- 13
- 2
1
vote
1 answer
How to use Postman to authenticate Google Login with dj_rest_auth
So I am following the official documentation for Google sign in with DjangoRestFramework using DJ Rest Auth (this link)
I intend to authenticate with Postman Oauth2 (by following the guide and generating an Access Token)
Postman is generating an…

kcEmenike
- 172
- 1
- 7