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
0
votes
4 answers

Error when implementing a custom user

Implementing a custom user with an email as the primary key. When django rest and django-rest-auth is installed, I get an error below. Here is the error that django is throwing: django.core.exceptions.FieldDoesNotExist: BaseUser has no field named…
chuck
  • 71
  • 2
  • 6
0
votes
0 answers

How to get email verification code in Django Rest and Angular app?

I have my app build with Django Rest and Angular. I am using django-allauth and django-rest-auth modules for handling Users data. Upon registration I am sending verification key to the email address of the user. The link that the user recieves is…
0
votes
1 answer

How to make relation with all_auth/rest_auth user to some model. with cookie/token

I am using all_auth and rest_auth along with Angular. I have a model called Campaign class Campaign(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length=100) …
0
votes
0 answers

Authentication for non User-based entities

In my application I've two models that can make requests to the backend. One is django.contrib.auth.models.User based to is use rest_framework.authentication.TokenAuthentication and the second one is an entity named Hub. I use Authorization:…
Opal
  • 81,889
  • 28
  • 189
  • 210
0
votes
0 answers

CSRF Verification failed: missing referer header error with cordova and djangorestframework

I am building an app using cordova with backend implemented with django rest framework along with django rest-auth (for providing and django all-auth for providing REST api registration/login endpoints). I am also using django allauth but probably…
Divick
  • 1,213
  • 1
  • 20
  • 44
0
votes
2 answers

Django Rest Model serializers and model inheritance

I write custom model of user in my app. Application components are: Django 1.8 Django REST framework 3.2.4 Django-allauth 0.23.0 Django-rest-auth 0.5. Code of user model you can see pythonfiddle.com. When I go to Django-rest-auth registration…
GDA
  • 149
  • 1
  • 12
0
votes
1 answer

Adding an extra field in a ModelSerializer is not working

serializers.py: from rest_framework import serializers from django.utils.translation import ugettext_lazy as _ import models class ExtensibleModelSerializerOptions(serializers.Serializer): def __init__(self, meta): …
Gaurav Tomer
  • 721
  • 2
  • 9
  • 25
0
votes
1 answer

DjangoRestFramework / Django Class Based Views - How to make it redirect to login page if 403 error is raised

These are my views: # This view is accessed by going to "/CMS/app" class AppPageView(TemplateView): template_name = "app.html" @method_decorator(login_required) def dispatch(self, *args, **kwargs): return super(AppPageView,…
0
votes
1 answer

Django Rest Framework / AngularJS - Users do not get redirected anywhere after logging in, even though I have set LOGIN_REDIRECT_URL in settings.py

According to this link: http://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/#adding-login-to-the-browsable-api I need to add the following code to my URLs.py: url(r'^api-auth/', include('rest_framework.urls', …
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
1 answer

Multiple authentication app support

When developing a Django project, many third party authentication packages are available, for example: Django OAuth Toolkit, OAuth 2.0 support. Djoser, provides a set of views to handle basic actions such as registration, login, logout, password…
Yuwen Yan
  • 4,777
  • 10
  • 33
  • 63
0
votes
2 answers

Django not recognizing my Token?

I'm using Django Rest Framework on the backend and an ember-cli app on the frontend. The authentication is working correctly, but there seems to be a hole somewhere in authorization. # settings.py REST_FRAMEWORK = { 'DEFAULT_PERMISSION_CLASSES':…
awwester
  • 9,623
  • 13
  • 45
  • 72
0
votes
0 answers

Django Rest Framework + AngularJS not logging user in or throwing errors

This is my URLS.py: from django.conf.urls import url from django.conf.urls import include from CMSApp import views urlpatterns = [ url(r'^$', views.HomePageView.as_view()), url(r'^users$', views.user_list.as_view()), …
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
3 answers

is_authenticated returns True for logged out user

I'm writing a server app using Django, Django REST framework, Django-rest-auth and Django-allauth. I have a method that's used to pass messages between users, and this should only happen when the receiver is logged in. However, it seems that the…
0
votes
1 answer

How should I register a new user(custom) in django rest framework?

When ever I create a new User, the corresponding BaseUser is not getting created. The signal is working correctly as I have checked without the attributes department and user_type how do I go about registering the BaseUser? #…
0
votes
2 answers

Setting user id automatically on POST in Django REST

I'm trying to POST a "record" using Django REST. I want Django to automagically set the user id from the logged in user. views.py: class ItemViewSet(viewsets.ModelViewSet): queryset = Item.objects.all() serializer_class = ItemSerializer …
Henrik
  • 1,983
  • 3
  • 28
  • 52
1 2 3
38
39