View | Details | Raw Unified | Return to bug 28786
Collapse All | Expand All

(-)a/Koha/Auth/TwoFactorAuth.pm (+6 lines)
Lines 36-41 my $ok = $auth->verify($pin_code, 1, $secret32); Link Here
36
36
37
It's based on Auth::GoogleAuth
37
It's based on Auth::GoogleAuth
38
38
39
=head2 METHODS
40
41
=head3 new
42
43
    $obj = Koha::Auth::TwoFactorAuth->new({ patron => $p, secret => $s });
44
39
=cut
45
=cut
40
46
41
sub new {
47
sub new {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt (-4 / +4 lines)
Lines 39-46 Link Here
39
                        <p>We recommend cloud-based mobile authenticator apps such as Authy, Duo Mobile, and LastPass. They can restore access if you lose your hardware device.</p>
39
                        <p>We recommend cloud-based mobile authenticator apps such as Authy, Duo Mobile, and LastPass. They can restore access if you lose your hardware device.</p>
40
                        <p>Can't scan the code?</p>
40
                        <p>Can't scan the code?</p>
41
                        <p>To add the entry manually, provide the following details to the application on your phone.</p>
41
                        <p>To add the entry manually, provide the following details to the application on your phone.</p>
42
                        <p>Account: [% issuer %]</p>
42
                        <p>Account: [% issuer | html %]</p>
43
                        <p>Key: [% key_id %]</p>
43
                        <p>Key: [% key_id | html %]</p>
44
                        <p>Time based: Yes</p>
44
                        <p>Time based: Yes</p>
45
                    </div>
45
                    </div>
46
46
Lines 51-61 Link Here
51
                        <fieldset class="rows">
51
                        <fieldset class="rows">
52
                            <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
52
                            <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
53
                            <input type="hidden" name="op" value="register-2FA" />
53
                            <input type="hidden" name="op" value="register-2FA" />
54
                            <input type="hidden" name="secret32" value="[% secret32 %]" />
54
                            <input type="hidden" name="secret32" value="[% secret32 | html %]" />
55
                            <ol>
55
                            <ol>
56
                                <li>
56
                                <li>
57
                                    <label for="qr_code">QR code: </label>
57
                                    <label for="qr_code">QR code: </label>
58
                                    <img id="qr_code" src="[% qr_code_url %]" />
58
                                    <img id="qr_code" src="[% qr_code_url | $raw %]" />
59
                                </li>
59
                                </li>
60
                                <li>
60
                                <li>
61
                                    <label for="pin_code">Pin code: </label>
61
                                    <label for="pin_code">Pin code: </label>

Return to bug 28786