From 4a6b366035ca068ea59a4aca65b608677eb9c524 Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Fri, 10 Jun 2022 11:10:41 +0200
Subject: [PATCH] Use Pillow to create QR codes so they are PNG and not SVG.

---
 hypha/settings/base.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hypha/settings/base.py b/hypha/settings/base.py
index 3c12ef1e8..27c5b16b6 100644
--- a/hypha/settings/base.py
+++ b/hypha/settings/base.py
@@ -296,6 +296,10 @@ PASSWORD_RESET_TIMEOUT = env.int('PASSWORD_RESET_TIMEOUT', 259200)
 # Seconds to enter password on password page while email change/2FA change (default 120).
 PASSWORD_PAGE_TIMEOUT = env.int('PASSWORD_PAGE_TIMEOUT', 120)
 
+# Use Pillow to create QR codes so they are PNG and not SVG.
+# Apples Safari on iOS and macOS can then recognise them automatically.
+TWO_FACTOR_QR_FACTORY = 'qrcode.image.pil.PilImage'
+
 # Internationalization
 # https://docs.djangoproject.com/en/stable/topics/i18n/
 
-- 
GitLab