diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index c10e8bf2..603943c4 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -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 `_ -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 `_ -with: +by specifying the ``social-auth`` extra: .. code-block:: bash - $ pip install -U social-auth-app-django + $ pip install -U djoser[social-auth] Configuration ------------- diff --git a/pyproject.toml b/pyproject.toml index cf37607a..8a8d1c0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]