5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Two-factor authentication › Patrons › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="pat_two_factor_auth" class="pat">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'patron-search.inc' %]
13 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
22 <a href="#" aria-current="page">
23 Manage two-factor authentication
29 <div class="main container-fluid">
31 <div class="col-sm-10 col-sm-push-2">
34 [% INCLUDE 'members-toolbar.inc' %]
36 <h1>Manage two-factor authentication</h1>
38 [% IF ( missing_key ) %]
39 <div id="error_message" class="dialog message">
41 Operation cannot proceed, please define an encryption key in your configuration.
46 [% IF op == 'register' %]
47 <div class="dialog message">
48 <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>
49 <p>Can't scan the code?</p>
50 <p>To add the entry manually, provide the following details to the application on your phone.</p>
51 <p>Account: [% issuer | html %]</p>
52 <p>Key: [% key_id | html %]</p>
53 <p>Time based: Yes</p>
57 <div class="dialog error">Invalid PIN code</div>
59 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
60 <fieldset class="rows">
61 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
62 <input type="hidden" name="op" value="register-2FA" />
63 <input type="hidden" name="secret32" value="[% secret32 | html %]" />
66 <label for="qr_code">QR code: </label>
67 <img id="qr_code" src="[% qr_code | $raw %]" />
70 <label for="pin_code">PIN code: </label>
71 <input type="text" id="pin_code" name="pin_code" value="" />
75 <fieldset class="action">
76 <input type="submit" value="Register with two-factor app" />
77 <a class="cancel" href="/cgi-bin/koha/members/two_factor_auth.pl">Cancel</a>
81 [% IF patron.auth_method == "two-factor" %]
82 <div class="two-factor-status">Status: Enabled</div>
84 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
85 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
86 <input type="hidden" name="op" value="disable-2FA" />
87 <input type="submit" value="Disable two-factor authentication" />
90 <div class="two-factor-status">Status: Disabled</div>
92 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
93 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
94 <input type="hidden" name="op" value="enable-2FA" />
95 <input type="submit" value="Enable two-factor authentication" />
102 </div> <!-- /.col-sm-10.col-sm-push-2 -->
104 <div class="col-sm-2 col-sm-pull-10">
106 [% INCLUDE 'circ-menu.inc' %]
108 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
109 </div> <!-- /.row -->
112 [% MACRO jsinclude BLOCK %]
113 [% INCLUDE 'str/members-menu.inc' %]
114 [% Asset.js("js/members-menu.js") | $raw %]
116 $(document).ready(function(){
117 $(".delete").on("click", function(e){
118 return confirmDelete(_("Are you sure you want to delete this key?"));
124 [% INCLUDE 'intranet-bottom.inc' %]