Bug 34028: Fix manual entry for two factor authentication
authorDavid Cook <dcook@prosentient.com.au>
Fri, 16 Jun 2023 06:04:37 +0000 (06:04 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Fri, 18 Aug 2023 10:32:58 +0000 (10:32 +0000)
commitfec6a596c36a6ff44552f7e4afc8d6593fb3a77d
tree5e9dca2f12c706b560e1f1f4610fcf0ea83b5fe7
parentebd4a6cfa7ae59b8c67c8b34f7913c223c44455d
Bug 34028: Fix manual entry for two factor authentication

This patch changes the "Account" and "Key" display so that
you can manually enter two factor authentication details into
an authenticator app.

The details are the same as those provided by scanning the QR code.

Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
2. Change setting to "Enable"
3. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Click "More" on record toolbar and choose "Manage two-factor authentication"
5. Click "Enable two-factor authentication"
6. Scan the QR code into an authenticator app and note it creates an entry called
"Centerville: Centerville_koha"
7. Manually enter an entry into an authenticator app (like Google Authenticator)
7a. Add the "Account" as shown on the Koha screen
7b. Add the "Key" as shown on the Koha screen
8. Note that the entries added by QR code and manual entry have the same
label and both were accepted by the authenticator app

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c05333914e3f54d66b9de6dde82b614ea83569a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a51d570a6ebff0989df8e599dc4b1a2cd0b14172)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/auth-two-factor.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt