From: William Desportes <williamdes@wdes.fr>
Date: Sat, 21 Jan 2023 11:37:10 +0400
Subject: Update documentation to add missing packages for 2FA

Origin: vendor
Forwarded: not-needed
---
 doc/two_factor.rst                         | 4 ++--
 libraries/classes/TwoFactor.php            | 6 +++---
 templates/preferences/two_factor/main.twig | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/two_factor.rst b/doc/two_factor.rst
index b507718..67afd04 100644
--- a/doc/two_factor.rst
+++ b/doc/two_factor.rst
@@ -15,13 +15,13 @@ manually; the typical way of doing so is with the command:
 
 .. code-block:: sh
 
-    composer require pragmarx/google2fa-qrcode bacon/bacon-qr-code
+    apt install php-pragmarx-google2fa-qrcode php-bacon-qr-code
 
 Or when using a hardware security key with FIDO U2F:
 
 .. code-block:: sh
 
-    composer require code-lts/u2f-php-server
+    apt install php-code-lts-u2f-php-server
 
 Authentication Application (2FA)
 --------------------------------
diff --git a/libraries/classes/TwoFactor.php b/libraries/classes/TwoFactor.php
index da77d08..1c78ac6 100644
--- a/libraries/classes/TwoFactor.php
+++ b/libraries/classes/TwoFactor.php
@@ -161,21 +161,21 @@ class TwoFactor
         if (! class_exists(Google2FA::class)) {
             $result[] = [
                 'class' => Application::getName(),
-                'dep' => 'pragmarx/google2fa-qrcode',
+                'dep' => 'php-pragmarx-google2fa-qrcode',
             ];
         }
 
         if (! class_exists(ImageRenderer::class)) {
             $result[] = [
                 'class' => Application::getName(),
-                'dep' => 'bacon/bacon-qr-code',
+                'dep' => 'php-bacon-qr-code',
             ];
         }
 
         if (! class_exists(U2FServer::class)) {
             $result[] = [
                 'class' => Key::getName(),
-                'dep' => 'code-lts/u2f-php-server',
+                'dep' => 'php-code-lts-u2f-php-server',
             ];
         }
 
diff --git a/templates/preferences/two_factor/main.twig b/templates/preferences/two_factor/main.twig
index e1b2c76..9343804 100644
--- a/templates/preferences/two_factor/main.twig
+++ b/templates/preferences/two_factor/main.twig
@@ -9,7 +9,7 @@
     {% if enabled %}
       {% if num_backends == 0 %}
         <p>{% trans "Two-factor authentication is not available, please install optional dependencies to enable authentication backends." %}</p>
-        <p>{% trans "Following composer packages are missing:" %}</p>
+        <p>{% trans "Following APT packages are missing:" %}</p>
         <ul>
           {% for item in missing %}
             <li><code>{{ item.dep }}</code> ({{ item.class }})</li>
