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 [% WRAPPER 'header.inc' %]
11 [% INCLUDE 'patron-search-header.inc' %]
14 [% WRAPPER 'sub-header.inc' %]
15 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
21 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
24 <a href="#" aria-current="page">
25 Manage two-factor authentication
32 <div class="main container-fluid">
34 <div class="col-sm-10 col-sm-push-2">
37 [% INCLUDE 'members-toolbar.inc' %]
39 <h1>Manage two-factor authentication</h1>
41 [% IF ( missing_key ) %]
42 <div id="error_message" class="dialog message">
44 Operation cannot proceed, please define an encryption key in your configuration.
49 [% IF op == 'register' %]
50 <div class="dialog message">
51 <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>
52 <p>Can't scan the code?</p>
53 <p>To add the entry manually, provide the following details to the application on your phone.</p>
54 <p>Account: [% issuer | html %]</p>
55 <p>Key: [% key_id | html %]</p>
56 <p>Time based: Yes</p>
60 <div class="dialog error">Invalid PIN code</div>
62 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
63 <fieldset class="rows">
64 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
65 <input type="hidden" name="op" value="register-2FA" />
66 <input type="hidden" name="secret32" value="[% secret32 | html %]" />
69 <label for="qr_code">QR code: </label>
70 <img id="qr_code" src="[% qr_code | $raw %]" />
73 <label for="pin_code">PIN code: </label>
74 <input type="text" id="pin_code" name="pin_code" value="" />
78 <fieldset class="action">
79 <input type="submit" value="Register with two-factor app" />
80 <a class="cancel" href="/cgi-bin/koha/members/two_factor_auth.pl">Cancel</a>
84 [% IF patron.auth_method == "two-factor" %]
85 <div class="two-factor-status">Status: Enabled</div>
87 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
88 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
89 <input type="hidden" name="op" value="disable-2FA" />
90 <input type="submit" value="Disable two-factor authentication" />
93 <div class="two-factor-status">Status: Disabled</div>
95 <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
96 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
97 <input type="hidden" name="op" value="enable-2FA" />
98 <input type="submit" value="Enable two-factor authentication" />
105 </div> <!-- /.col-sm-10.col-sm-push-2 -->
107 <div class="col-sm-2 col-sm-pull-10">
109 [% INCLUDE 'circ-menu.inc' %]
111 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
112 </div> <!-- /.row -->
115 [% MACRO jsinclude BLOCK %]
116 [% INCLUDE 'str/members-menu.inc' %]
117 [% Asset.js("js/members-menu.js") | $raw %]
119 $(document).ready(function(){
120 $(".delete").on("click", function(e){
121 return confirmDelete(_("Are you sure you want to delete this key?"));
127 [% INCLUDE 'intranet-bottom.inc' %]