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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 26 Jun 2023 12:56:48 +0000 (14:56 +0200)
commita51d570a6ebff0989df8e599dc4b1a2cd0b14172
tree4dffe76d19b5dbf863594ad4f4466b135dd612ad
parente4503252d63ec408fbdc8190dffc8657ed463f3f
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>
koha-tmpl/intranet-tmpl/prog/en/includes/auth-two-factor.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt