From 88cd9e586e2e0d0ccea745018ba2f9a91e04ec93 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Nov 2019 12:23:11 +0300 Subject: [PATCH] add placeholder UI plumbing for app passwords --- classes/pref/prefs.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 1cf751b62..d9482b966 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -395,6 +395,14 @@ class Pref_Prefs extends Handler_Protected { print ""; print ""; # content pane + print "
"; + + print_notice("You can create separate passwords for API clients. Using one is required if you enable OTP."); + + + + print "
"; # content pane + print "
"; if ($_SESSION["auth_module"] == "auth_internal") { @@ -442,14 +450,16 @@ class Pref_Prefs extends Handler_Protected { } else { print_warning("You will need a compatible Authenticator to use this. Changing your password would automatically disable OTP."); - - print_notice("Scan the following code by the Authenticator application or use OTP key (below)."); + print_notice("You will also need to create a separate App password for API clients if you enable OTP."); if (function_exists("imagecreatefromstring")) { + print "

" . __("Scan the following code by the Authenticator application or copy the key manually:") . "

"; + $csrf_token = $_SESSION["csrf_token"]; print "otp qr-code"; } else { print_error("PHP GD functions are required to generate QR codes."); + print "

" . __("Use the following OTP key with a compatible Authenticator application:") . "

"; } print "
";