Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow djoser install without optional JWT / social-auth dependencies #782

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ Installation

$ pip install -U djoser

If you are going to use JWT authentication, you will also need to install
If you are going to use JWT authentication, you will also need to install the dependency
`djangorestframework_simplejwt <https://github.com/davesque/django-rest-framework-simplejwt>`_
with:
by specifying the ``jwt`` extra:

.. code-block:: bash

$ pip install -U djangorestframework_simplejwt
$ pip install -U djoser[jwt]

Finally if you are going to use third party based authentication e.g. facebook,
you will need to install `social-auth-app-django <https://github.com/python-social-auth/social-app-django>`_
with:
by specifying the ``social-auth`` extra:

.. code-block:: bash

$ pip install -U social-auth-app-django
$ pip install -U djoser[social-auth]

Configuration
-------------
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ packages = [

[tool.poetry.dependencies]
python = "^3.8"
djangorestframework-simplejwt = "^5.0"
django = ">=3.0.0"
django-templated-mail = "^1.1.1"
social-auth-app-django = "^5.0.0"
djangorestframework-simplejwt = { version = "^5.0", optional = true }
social-auth-app-django = { version = "^5.0.0", optional = true }
djet = { version = "^0.3.0", optional = true }
webauthn = { version = "<1.0", optional = true }
django = ">=3.0.0"

[tool.poetry.extras]
# https://python-poetry.org/docs/pyproject/#extras
jwt = ["djangorestframework-simplejwt"]
social-auth = ["social-auth-app-django"]
djet = ["djet"]
webauthn = ["webauthn"]

Expand Down