diff --git a/README.rst b/README.rst index cb0f544..b6871aa 100644 --- a/README.rst +++ b/README.rst @@ -246,6 +246,8 @@ If your SAML2 identity provider uses user attribute names other than the defaults listed in the `settings.py` `ATTRIBUTES_MAP`, update them in `settings.py`. +If using a custom User model, update or remove the Backend model specification in views.py + For Okta Users ============== diff --git a/django_saml2_auth/views.py b/django_saml2_auth/views.py index 865c112..1731a9f 100644 --- a/django_saml2_auth/views.py +++ b/django_saml2_auth/views.py @@ -196,6 +196,7 @@ def acs(r): r.session.flush() if target_user.is_active: + # When using a custom User model, update or remove this backend model specification target_user.backend = 'django.contrib.auth.backends.ModelBackend' login(r, target_user) else: