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

Overview
Comments
  • JWT support

    JWT support

    From #122 to support JWT

    Documentation probably needs some updates and I'd like the implementation approved, but submitting the pull now to start the discussion.

    opened by jgr3go 19
  • Error with Social Authentication (Facebook): NoReverseMatch: Reverse for 'socialaccount_signup'

    Error with Social Authentication (Facebook): NoReverseMatch: Reverse for 'socialaccount_signup'

    Hello, I enabled Facebook login following documentation but I'm getting the same error described here: https://github.com/pennersr/django-allauth/issues/558

    What am I missing? Thanks in advance.

    opened by eriol 16
  • Checking for pre-existing accounts from a different flow when using social connect

    Checking for pre-existing accounts from a different flow when using social connect

    This fixes the following flow:

    • user creates an account with normal signup
    • user signs out
    • user tries to login with a social account that has the same email address

    Linked to https://github.com/Tivix/django-rest-auth/issues/78

    opened by philippeluickx 14
  • Release 0.8.0

    Release 0.8.0

    0.8.0 was merged in #147, but hasn't been tagged in github & released on pypi (or docs generated). I don't think I have the permissions to do so, so this is just to track when it's complete.

    opened by jgr3go 13
  • Work with DRF 3.5

    Work with DRF 3.5

    With the new DRF 3.5, django-rest-auth seems to break and needs something similar to:

    "get_queryset()" added to UserDetailViews.

    Can we please get an updated version that runs correctly on 3.5?

    opened by oboingo 12
  • how can i override django-rest-auth options?

    how can i override django-rest-auth options?

    in login, i want:

    1. email
    2. password
    3. username(i want to remove it)

    in signup

    1. first_name & last_name ( i want to add it)
    2. username ( i want to remove it)
    3. email
    4. password

    I have same configuration on django-allauth.

    opened by piyushmaurya23 12
  • Social login with VK

    Social login with VK

    Hi,

    I have endpoints for social login with Facebook and VK. Facebook login works perfect. But adapter for VK is little bit different and it needs also uid to complete login. Is there way to configure SocialLoginSerializer like other serializer, so I can override it?

    Thank you.

    opened by gorros 12
  • Implement connect social accounts functionality

    Implement connect social accounts functionality

    Hi @ducheneaut,

    I opened an issue #347 a while back and got a few upvotes for implementing social connect functionality in django-rest-auth core.

    We've used this connect functionality for quite a while in production and it functions quite nicely. Others have reported it works perfectly as well, so I think this has been validated and proven useful.

    If someone wishes to contribute the documentation and / or tests, that would be nice, though the change set is so limited it probably doesn't need much testing. The list and disconnect viewset is probably the most interesting thing that should be tested, and some documentation could be added on the usage of the new components :)

    opened by aleksihakli 11
  • Logout view change permission_classes

    Logout view change permission_classes

    Shouldn't the LogoutView have permission_classes set to permission_classes = (IsAuthenticated,) instead of permission_classes = (AllowAny,) , regardless of GET/POST method ?

    • in addition in the logout function:
     def logout(self, request):
        try:
                request.user.auth_token.delete()
          except (AttributeError, ObjectDoesNotExist):
                pass
    

    should be changed to

       def logout(self, request):
            try:
                request.user.auth_token.delete()
            except (AttributeError, ObjectDoesNotExist):
                # handle NotAuthenticated
    
    opened by shaklev 11
  • allauth>=0.25.0 :   __init__() takes exactly 2 arguments (1 given) error

    allauth>=0.25.0 : __init__() takes exactly 2 arguments (1 given) error

    Internal Server Error: /rest-auth/facebook/
    Traceback (most recent call last):
      File "/Users/mywork/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
        response = self.process_exception_by_middleware(e, request)
      File "/Users/mywork/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/Users/mywork/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
        return view_func(*args, **kwargs)
      File "/Users/mywork/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
        return self.dispatch(request, *args, **kwargs)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
        response = self.handle_exception(exc)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
        response = handler(request, *args, **kwargs)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_auth/views.py", line 50, in post
        self.serializer.is_valid(raise_exception=True)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/serializers.py", line 213, in is_valid
        self._validated_data = self.run_validation(self.initial_data)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/serializers.py", line 410, in run_validation
        value = self.validate(value)
      File "/Users/mywork/venv/lib/python2.7/site-packages/rest_auth/registration/serializers.py", line 63, in validate
        adapter = adapter_class()
    TypeError: __init__() takes exactly 2 arguments (1 given)
    

    I just follow installation

    from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
    from rest_auth.registration.views import SocialLoginView
    
    class FacebookLogin(SocialLoginView):
        adapter_class = FacebookOAuth2Adapter
    
    urlpatterns = [
    ...
            url(r'^rest-auth/', include('rest_auth.urls')),
        url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
        url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'),
    
    ]
    
    opened by nvcken 11
  • Can't override

    Can't override "password_reset_key_message.txt"

    I'm having issues overriding the default email for the "forgot password". I can override the 2 email for "email confirmation" without any issue but not with this one.

    Not matter the extension, the one sent is always the default one that comes with the package.

    Thanks

    opened by MadReal 10
  • The package doesn't work with django 4.0.*

    The package doesn't work with django 4.0.*

    in https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/urls.py you used " from django.conf.urls import url " but it's removed from django and makes some problems

    opened by roham96 0
  • The package doesn't work with django 4.0.*

    The package doesn't work with django 4.0.*

    when trying to install the recent version of django-rest-authwith Django 4 since it uses the deprecated function ugettext_lazy from django.utils.translation the error :

      File "/path/to/views/views.py", line 8, in <module>
        from rest_auth.registration.serializers import SocialLoginSerializer
      File "/path/to/python3.8/site-packages/rest_auth/registration/serializers.py", line 2, in <module>
        from django.utils.translation import ugettext_lazy as _
    ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/path/to/venv/lib/python3.8/site-packages/django/utils/translation/__init__.py)
    
    opened by hamza-hadda 1
  • ImportError: cannot import name 'url' from 'django.conf.urls'

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

    (env_universal) usama@Usamas-MacBook-Pro DRF_test % python manage.py makemigrations Traceback (most recent call last): File "/Users/usama/Desktop/projects/DRF_test/manage.py", line 22, in main() File "/Users/usama/Desktop/projects/DRF_test/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line utility.execute() File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/init.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 414, in run_from_argv self.execute(*args, **cmd_options) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 455, in execute self.check() File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 487, in check all_issues = checks.run_checks( File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/urls.py", line 14, in check_url_config return check_resolver(resolver) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/urls.py", line 24, in check_resolver return check_method() File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 480, in check for pattern in self.url_patterns: File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/utils/functional.py", line 49, in get res = instance.dict[self.name] = self.func(instance) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 696, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/utils/functional.py", line 49, in get res = instance.dict[self.name] = self.func(instance) File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 689, in urlconf_module return import_module(self.urlconf_name) File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/usama/Desktop/projects/DRF_test/buzzshare/urls.py", line 8, in path('rest-auth/', include('rest_auth.urls')), File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/conf.py", line 38, in include urlconf_module = import_module(urlconf_module) File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/rest_auth/urls.py", line 1, in from django.conf.urls import url ImportError: cannot import name 'url' from 'django.conf.urls' (/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/conf/urls/init.py) (env_universal) usama@Usamas-MacBook-Pro DRF_test % pip install django-rest-auth

    Is it not compatible with django 4

    opened by UsamaHaide0786 2
Releases(0.9.5)
Owner
Tivix
We are a global software consultancy, headquartered in Silicon Valley (San Francisco) with additional offices in Portland, NYC, and Europe.
Tivix
A Django-powered API with various utility apps / endpoints.

A Django-powered API Includes various utility apps / endpoints. Demos These web apps provide a frontend to the APIs in this project. Issue API Explore

Shemar Lindie 0 Sep 13, 2021
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Dec 28, 2022
REST implementation of Django authentication system.

djoser REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such

Sunscrapers 2.2k Jan 1, 2023
A JSON Web Token authentication plugin for the Django REST Framework.

Simple JWT Abstract Simple JWT is a JSON Web Token authentication plugin for the Django REST Framework. For full documentation, visit django-rest-fram

Jazzband 3.3k Jan 4, 2023
RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

Microsoft 1.8k Jan 4, 2023
Mlflow-rest-client - Python client for MLflow REST API

Python Client for MLflow Python client for MLflow REST API. Features: Minimal de

MTS 35 Dec 23, 2022
Country-specific Django helpers, to use in Django Rest Framework

django-rest-localflavor Country-specific serializers fields, to Django Rest Framework Documentation (soon) The full documentation is at https://django

Gilson Filho 19 Aug 30, 2022
BloodDonors: Built using Django REST Framework for the API backend and React for the frontend

BloodDonors By Daniel Yuan, Alex Tian, Aaron Pan, Jennifer Yuan As the pandemic raged, one of the side effects was an urgent shortage of blood donatio

Daniel Yuan 1 Oct 24, 2021
Django REST API with React BoilerPlate

This is a setup of Authentication and Registration Integrated with React.js inside the Django Templates for web apps

Faisal Nazik 91 Dec 30, 2022
JSON:API support for Django REST framework

JSON:API and Django REST framework Overview JSON:API support for Django REST framework Documentation: https://django-rest-framework-json-api.readthedo

null 1k Dec 27, 2022
simple api build with django rest framework

Django Rest API django-rest-framework Employees management simple API in this project wrote test suites for endpoints wrote simple doc string for clas

OMAR.A 1 Mar 31, 2022
Simple Crud Api With Django Rest Framework

SIMPLE CRUD API WITH DJANGO REST FRAMEWORK Django REST framework is a powerful and flexible toolkit for building Web APIs. Requirements Python 3.6 Dja

kibet hillary 1 May 3, 2022
Build a Backend REST API with Python & Django

Build a Backend REST API with Python & Django Skills Python Django djangorestframework Aws Git Use the below Git commands in the Windows Command Promp

JeonSoohyun a.k.a Edoc.. 1 Jan 25, 2022
Generate Views, Serializers, and Urls for your Django Rest Framework application

DRF Generators Writing APIs can be boring and repetitive work. Don't write another CRUDdy view in Django Rest Framework. With DRF Generators, one simp

Tobin Brown 332 Dec 17, 2022
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

drf-yasg - Yet another Swagger generator Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest Framework API. Compatible with Django Res

Cristi Vîjdea 3k Jan 6, 2023
Introduction to Django Rest Framework

Introduction to Django Rest Framework This is the repository of the video series Introduction to Django Rest Framework published on YouTube. It is a s

Simple is Better Than Complex 20 Jul 14, 2022
Scaffold django rest apis like a champion 🚀

scaffold django rest apis like a champion ??

Abdenasser Elidrissi 133 Jan 5, 2023
DRF-extensions is a collection of custom extensions for Django REST Framework

Django REST Framework extensions DRF-extensions is a collection of custom extensions for Django REST Framework Full documentation for project is avail

Gennady Chibisov 1.3k Dec 28, 2022