From 1f897b42c509335a355cae218e5431c6b6a65c92 Mon Sep 17 00:00:00 2001 From: Diego Rodriguez Date: Mon, 11 May 2020 13:21:02 +0200 Subject: [PATCH] config: configure Flask-KVSession * Closes inveniosoftware/invenio-accounts#289. --- .../{{cookiecutter.package_name}}/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py index 1f606f0..2ac284b 100644 --- a/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py +++ b/{{cookiecutter.project_shortname}}/{{cookiecutter.package_name}}/config.py @@ -87,6 +87,15 @@ def _(x): #: client. Set to False, in case of doubt. ACCOUNTS_USERINFO_HEADERS = True +# Sessions +# ======== +#: SameSite cookie type to be used to store user sessions. +SESSION_COOKIE_SAMESITE = 'Strict' + +#: Session maniputalion interface (Flask-KVSession). +SESSION_INTERFACE_FACTORY = \ + 'invenio_accounts.sessions:KVSessionInterfaceStoreAuthenticated' + # Celery configuration # ====================