{"id":21160,"library":"django-rest-auth","title":"django-rest-auth","description":"Django-rest-auth provides a set of REST API endpoints for authentication and registration in Django projects using Django REST Framework. Version 0.9.5 is the latest release, but the library is in maintenance mode with no active development; it is superseded by dj-rest-auth.","status":"maintenance","version":"0.9.5","language":"python","source_language":"en","source_url":"https://github.com/Tivix/django-rest-auth","tags":["django","rest framework","authentication","registration","allauth"],"install":[{"cmd":"pip install django-rest-auth==0.9.5","lang":"bash","label":"Install latest release"}],"dependencies":[{"reason":"Core framework","package":"django","optional":false},{"reason":"REST framework","package":"djangorestframework","optional":false},{"reason":"Registration and social auth","package":"django-allauth","optional":false}],"imports":[{"note":"View class is LoginView, not Login","wrong":"from rest_auth.views import Login","symbol":"rest_auth.views","correct":"from rest_auth.views import LoginView"},{"note":"","wrong":null,"symbol":"rest_auth.serializers","correct":"from rest_auth.serializers import LoginSerializer"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    'django.contrib.sites',\n    'allauth',\n    'allauth.account',\n    'rest_auth',\n    'rest_framework',\n]\nSITE_ID = 1\n\n# urls.py\nfrom django.urls import path, include\nurlpatterns = [\n    path('rest-auth/', include('rest_auth.urls')),\n]\n\n# Then run python manage.py migrate","lang":"python","description":"Minimal setup to add REST auth endpoints."},"warnings":[{"fix":"Replace django-rest-auth with dj-rest-auth and update import paths (from rest_auth to dj_rest_auth).","message":"This library is no longer actively maintained; consider using dj-rest-auth instead.","severity":"gotcha","affected_versions":"all"},{"fix":"Add on_delete=models.CASCADE to any custom models or use dj-rest-auth which has updated support.","message":"In Django 3.0+, the on_delete argument is required for ForeignKey fields; django-rest-auth's internal models may cause migration issues.","severity":"breaking","affected_versions":"0.9.5"},{"fix":"Use rest_auth.urls or include rest_auth.social_urls and set up social apps in Django admin.","message":"Social authentication requires additional endpoints and configuration with django-allauth; default URLs do not include social login.","severity":"gotcha","affected_versions":"all"},{"fix":"Use dj-rest-auth with djangorestframework-simplejwt instead.","message":"The old JWT support via django-rest-framework-jwt is deprecated and incompatible with newer Django REST Framework versions.","severity":"deprecated","affected_versions":"0.9.x"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install django-rest-auth","cause":"Package not installed or installed under different name.","error":"ImportError: No module named 'rest_auth'"},{"fix":"Uninstall django-rest-auth and use only dj-rest-auth: pip uninstall django-rest-auth; pip install dj-rest-auth","cause":"Old version installed side-by-side with dj-rest-auth or duplicate app config.","error":"django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: rest_auth"},{"fix":"Ensure you are using correct view class and serializer; check documentation for custom LoginView.","cause":"Misconfigured serializer or custom view inheritance.","error":"AttributeError: 'LoginView' object has no attribute 'authentication_classes'"},{"fix":"Update to latest version (0.9.5) and check serializer instantiation patterns.","cause":"Serializer called incorrectly or outdated version.","error":"TypeError: __init__() got an unexpected keyword argument 'request'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}