Questions tagged [django-rest-auth]

Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

Features

  • User Registration with activation
  • Login/Logout
  • Retrieve/Update the Django User model
  • Password change
  • Password reset via e-mail
  • Social Media authentication

Resources

Documentation: https://django-rest-auth.readthedocs.io/en/latest/

GitHub repo: https://github.com/Tivix/django-rest-auth

jQuery demo: https://github.com/Tivix/django-rest-auth/tree/master/demo

AngularJS demo: https://github.com/Tivix/angular-django-registration-auth

584 questions
4
votes
1 answer

Django REST to React - getting social auth tokens without password

I want to pass info to React about the current authenticated user within an app that only uses social authentication on the backend (that is processed by social_django). All of my user and user token info is stored within django REST, and to access…
4
votes
2 answers

django-rest-auth registration/verify-email/ not working

I just download demo from official django-rest-auth site and tried to use but some API endpoint not working. I successfully signup (register) user with restful API, i get key in response: `{"key":"e96496ecb7fbe85d5ab60fe5d5f9a15b33a967fe"}` and…
4
votes
1 answer

Create a serializer for custom user model in django-rest-auth?

I've installed django-rest-framework. Also i've installed django allauth. Now i want to use django-rest-auth based on previous two, for serializing data and sending it in json format as answer on my submit form method (for registration/login etc). I…
4
votes
1 answer

django-rest-auth facebook NoReverseMatch:Reverse for 'socialaccount_signup' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s)

I am using django_rest_auth for facebook login. I am always getting this error when i try to login via facebook api /rest_auth/facebook/ I tried this post, didnt help. [04/Dec/2016 12:55:42] "POST /rest-auth/facebook/ HTTP/1.1" 500 126046 Internal…
Arnold Laishram
  • 1,801
  • 2
  • 18
  • 25
4
votes
2 answers

What is the point of having "logout" endpoint in django-rest-auth?

I this article I have read that token based authentication is stateless, meaning that the servers don't keep record of logged in users. On the other hand in the django-rest-auth API docs there is a logout endpoint mentioned. What is it for?
user2449761
  • 1,169
  • 13
  • 25
4
votes
2 answers

Django Rest Auth custom reset password confirm url

With django-rest-framework, when you post a reset password (rest-auth/password/reset/), there is an email send to the user email. This email contains a confirmation URL. I would like to change this url because I'm on a REST app case, I want this…
Ben
  • 3,972
  • 8
  • 43
  • 82
4
votes
1 answer

How to add field in Token Model in Django Rest Framework Authtoken

i'm using rest_framework.authtoken.models Token. i can see 3 fields which is key, created_at and user_id. Background of App: I use chrome app as client for app, i want to use token authentication to connect with my APIs in django rest framework.…
Binsoi
  • 383
  • 5
  • 13
4
votes
2 answers

Django-rest-auth - Angular - 500 internal error

More or less, i am in the early stages developing an app that use Django Rest Framework and Angular. I decided to use django-rest-auth to manage all my user integration with my app. As I am new in Angular, i don't want to use django-rest-auth…
3
votes
0 answers

Django Api url conflicting whenever i apply the url of the app into the urlpatterns and i don't know the way forword here

So, whenever i add this path('api/', include('api.urls')) into the parent urls i get a bunch of errors in the terminal and if i remove it from the urlpatterns i get page not found wheni reload the localhost on my browser, and on the terminal page it…
3
votes
0 answers

Customize django-allauth / django-rest-auth Password Reset Confirm

In follow up on this question: rest-auth password reset, I now want to customize the following Password Reset Confirm page But to be honest, there is a lot of magic going on in the background so I have no idea where to start. Tried finding a…
DIJ
  • 347
  • 4
  • 19
3
votes
1 answer

auth_token for unittest in Django

I've been trying to test my login system using the following code from django.test import TestCase, Client from rest_framework.test import force_authenticate class DeckTestCase(TestCase): @classmethod def setUp(cls): test_user1 =…
3
votes
1 answer

React Native Google Authenticate with Django Allauth returns "Incorrect value" (iOS/Android)

I am trying to perform social authentication (with Google) using react native ios and android, with Django on the back end. Note, no firebase is involved here. Problem Overview React Native Google Signin on the front end returns an (i) access_token…
GoingLegit
  • 61
  • 1
  • 3
3
votes
3 answers

Django Rest Framework custom permission not working

I want users to have access only to the records that belong to them, not to any other users' records so I've created the following view: class AddressViewSet(viewsets.ModelViewSet): authentication_classes = (TokenAuthentication,) …
3
votes
0 answers

How to login in Django Rest Auth using username or email

In my django project, I am using django rest auth for api authentication. The default is to use username and password for login. I can also use email and password. But I want my user to have the option of either using email or username and password…
3
votes
1 answer

Django Rest Framework Panel - login and logout not working with Simple JWT

I am creating a backend api with DRF. I created a custom user model, I am using allauth and dj-rest-auth for authentication. So far so good, I also added this path to my urls so that the DRF panel allows me to login and logout: path('api-auth/',…