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

Update installation.rst to set LOGIN_URL #469

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ Start by making the following changes to your ``settings.py`` file.
AUTHENTICATION_BACKENDS = (
'mozilla_django_oidc.auth.OIDCAuthenticationBackend',
# ...

# Optional: Set LOGIN_URL to mozilla_django_oidc's login URL.
# Views decorated with django.contrib.auth.decorators.login_required decorator
# or class-based views using the LoginRequiredMixin or AccessMixin will
# automatically be redirected to this URL if a user is not logged in.
LOGIN_URL = 'oidc_authentication_init'
)

You also need to configure some OpenID Connect related settings too.
Expand Down Expand Up @@ -144,7 +150,7 @@ Next, edit your ``urls.py`` and add the following:
.. code-block:: python

from django.urls import path, include

urlpatterns = [
# ...
path('oidc/', include('mozilla_django_oidc.urls')),
Expand Down