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

ImportError: cannot import name 'url' from 'django.conf.urls' django-rest-auth

error : from django.conf.urls import url ImportError: cannot import name 'url' from 'django.conf.urls' -version Django==4.0.1 django-rest-auth==0.9.5 Pl help me.Thank you in advance url.py # Core Django imports from django.contrib import…
user17953070
7
votes
1 answer

Trouble getting Salesforce login working with dj-rest-auth + django-allauth

My app has a Django 3.1 backend with django-allauth and dj-rest-auth (actively supported fork of django-rest-auth). My mobile and web frontends can already sign in using Facebook and Google via REST. I'm now trying to add Salesforce as a 3rd REST…
sunw
  • 535
  • 5
  • 29
7
votes
4 answers

Google authentication using django-rest-auth and allauth

I am trying to create an authentication API for a flutter app that will log users in with a google authentication signup/login form. I followed this tutorial to achieve this. So far so good, except that the tutorial is based on a GitHub sign in…
7
votes
3 answers

remove authentication and permission for specific url path

I'm working with DRF and came across this issue. I have a third-party view which I'm importing in my urls.py file like this : from some_package import some_view urlpatterns = [ path('view/',some_view) ] but the issue I'm facing is since I have…
7
votes
1 answer

Combining serializer and model functions

I have two serializers... MyRegisterSerializer inherits and extends a popular app/package, django-rest-auth, which connects to a fairly standard user table. I also have a Model and serializer for a custom app, TeamSerializer (a one-to-many…
ambe5960
  • 1,870
  • 2
  • 19
  • 47
7
votes
1 answer

How to alter the LoginSerializer for one field for username/telephone/email?

In the custom LoginSerializer: class LoginSerializer(serializers.Serializer): username = serializers.CharField(required=False, allow_blank=True) email = serializers.EmailField(required=False, allow_blank=True) password =…
sof-03
  • 2,255
  • 4
  • 15
  • 33
7
votes
1 answer

Django Angular cors error: access-control-allow-origin not allowed

I have implemented auth in my django app using django-rest-auth. My settings in settings.py: ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', …
Thinker
  • 5,326
  • 13
  • 61
  • 137
6
votes
1 answer

Why django-rest-auth SocialLoginView is not working?

https://django-rest-auth.readthedocs.io/en/latest/installation.html here is the official docs about social login in django-rest-auth. they say the way to make the LoginView(GithubLogin, FacebookLogin, etc..) inheriting SocialLoginView like…
6
votes
3 answers

Django-rest-auth (dj-rest-auth) custom user registration

I'm using dj-rest-auth (https://dj-rest-auth.readthedocs.io/en/latest/) and trying to implement a custom registration form. When I'm trying to register a new user I have the base form. I've seen with the older version…
6
votes
2 answers

Axios requests using authentication token sometimes fail in Safari

I'm developing a react (16.9.0) single page app that uses axios (0.19.0). The axios requests use token authentication to access a server running django-rest-framework (3.6.4) and django-cors-headers (3.1.1). The authentication tokens are generated…
softweave
  • 1,455
  • 2
  • 16
  • 27
6
votes
4 answers

Django REST EmailAddress matching query does not exist

I am using django rest-auth and allauth to authenticate users. After successful signup and email verification, I implemented a login view which subclasses rest-auth.views.LoginView like below: class ThLoginView(LoginView): def get(self,…
6
votes
2 answers

Django all auth: How to override the confirmation email url

What I want to do is to override confirmation email url in templates/account/email/email_confirmation_message.txt. I want to change this part To confirm this is correct, go to {{ activate_url }} to something…
6
votes
1 answer

Google Sign-in in Android with django-rest-auth

I've been trying to add Google Sign-In in Android but have a couple of doubts. From the Android documentation Integrate google sign in android In the server side authentication part Client Id is required which is OAuth 2.0 web application client ID…
Mohit Solanki
  • 2,122
  • 12
  • 20
6
votes
2 answers

Django-rest-auth: Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name

I'm trying to use django-rest-auth password reset feature but after a post request at /rest-auth/password/reset/ i get the error stated in the title (Traceback) and i don't understand why. I followed the installation procedure from the documentation…
andrea56
  • 397
  • 3
  • 21
6
votes
1 answer

Where is the generated token in DJANGO stored during password reset

I am trying to access the generated token(in the database table) when I request the "forgotten password" functionality, but I cannot seem to find it. I am using django 1.10, rest_framework, django-rest-auth. I have checked inside authtoken_token as…
anyavacy
  • 1,618
  • 5
  • 21
  • 43
1 2
3
38 39