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) [email protected] 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) [email protected] 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
Dropdown population implementation for Django REST Framework

drf-dropdown Dropdown population implementation for Django REST Framework Usage Add DropdownView to API URL # urls.py import dropdown urlpatterns = [

Preeti Yuankrathok 4 Dec 06, 2022
Embrace the APIs of the future. Hug aims to make developing APIs as simple as possible, but no simpler.

Read Latest Documentation - Browse GitHub Code Repository hug aims to make developing Python driven APIs as simple as possible, but no simpler. As a r

Hug API Framework 6.7k Dec 27, 2022
Key-Value база данных на Tarantool и REST API к ней.

KVmail Key-Value база данных на Tarantool и REST API к ней. Документация к API доступна здесь. Requiremrnts ubuntu 16.04+ python3.6+ supervisord nginx

1 Jun 16, 2021
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 04, 2023
Eazytraining - Simple application to show how to query API from webapp

student-list Eazytraining - Simple application to show how to query API from webapp This repo is a simple application to list student with a webserver

⚡Christophe FREIJANES 2 Nov 15, 2021
Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST

Tivix 2.4k Dec 29, 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
REST API with Flask. No data persistence.

Flask REST API Python 3.9.7 The Flask experience, without data persistence :D First, to install all dependencies: python -m pip install -r requirement

Luis Quiñones Requelme 1 Dec 15, 2021
Async Python 3.6+ web server/framework | Build fast. Run fast.

Sanic | Build fast. Run fast. Build Docs Package Support Stats Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allow

Sanic Community Organization 16.7k Dec 28, 2022
Allows simplified Python interaction with Rapid7's InsightIDR REST API.

InsightIDR4Py Allows simplified Python interaction with Rapid7's InsightIDR REST API. InsightIDR4Py allows analysts to query log data from Rapid7 Insi

Micah Babinski 8 Sep 12, 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
The Web API toolkit. 🛠

🛠 The Web API toolkit. 🛠 Community: https://discuss.apistar.org 🤔 💭 🤓 💬 😎 Documentation: https://docs.apistar.com 📘 Requirements: Python 3.6+

Encode 5.6k Dec 27, 2022
Automatically generate a RESTful API service for your legacy database. No code required!

sandman2 sandman2 documentation [ ~ Dependencies scanned by PyUp.io ~ ] sandman2 automagically generates a RESTful API service from your existing data

Jeff Knupp 1.9k Jan 07, 2023
Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints.

💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

Vitaliy Kucheryaviy 3.8k Jan 04, 2023
A lightweight REST miniframework for Python.

restless A lightweight REST miniframework for Python. Documentation is at https://restless.readthedocs.io/. Works great with Django, Flask, Pyramid, T

Daniel Lindsley 824 Nov 20, 2022
Built on Django Rest Framework, to provide with command execution on linux terminal

Built on Django Rest Framework, to provide with command execution on linux terminal

1 Oct 31, 2021
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
Example Starlette REST API application

The idea of this project is to show how Starlette, Marshmallow, and SQLAlchemy can be combined to create a RESTful HTTP API application that is modular, lightweight, and capable of dealing with many

Robert Wikman 0 Jan 07, 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

1k Dec 27, 2022
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 04, 2023