Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: allow setting allauth ACCOUNT_SESSION_REMEMBER (#6105)

shamoon43ec154bc2f7
diff --git a/docs/configuration.md b/docs/configuration.md
index 5182d018b..981d27b27 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -589,6 +589,11 @@ system. See the corresponding
Defaults to False
+#### [`PAPERLESS_ACCOUNT_SESSION_REMEMBER=<bool>`](#PAPERLESS_ACCOUNT_SESSION_REMEMBER) {#PAPERLESS_ACCOUNT_SESSION_REMEMBER}
+
+: See the corresponding
+[django-allauth documentation](https://docs.allauth.org/en/latest/account/configuration.html)
+
## OCR settings {#ocr}
Paperless uses [OCRmyPDF](https://ocrmypdf.readthedocs.io/en/latest/)
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
index 77adb6bbf..a583ef406 100644
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -456,6 +456,8 @@ ACCOUNT_EMAIL_VERIFICATION = os.getenv(
"optional",
)
+ACCOUNT_SESSION_REMEMBER = __get_boolean("PAPERLESS_ACCOUNT_SESSION_REMEMBER")
+
if AUTO_LOGIN_USERNAME:
_index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")
# This overrides everything the auth middleware is doing but still allows