Fixes in double auth
This commit is contained in:
parent
b4f758f0b5
commit
b37316ce64
4 changed files with 81 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?=$this->layout('login_tpl', ['title' => $title])?>
|
||||
<?=$this->start('content')?>
|
||||
<form method="post" name="auth_submit" id="auth_submit">
|
||||
<p style="padding: 0px 10px;">You have 5 minutes for put the code sended to your email.</p>
|
||||
<p align="center" style="padding: 0px 10px;"><?=_('Check your email for get instructions for complete login with double auth or')?> <a href="<?=$this->make_url('admin', 'app', ['logout'])?>">logout</a> and login again with other user</p>
|
||||
<p><label for="auth_code"></label><input type="text" name="auth_code" id="auth_code_form" placeholder="<?=_('Code')?>"/></p>
|
||||
<p class="error" id="auth_code_error"></p>
|
||||
<?=PhangoApp\PhaUtils\Utils::set_csrf_key($name_token='csrf_token', $length_token=80)?>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
$('#loader-wrapper').show();
|
||||
|
||||
$.ajax({
|
||||
url: "<?=$this->make_url('admin', 'app', ['login'])?>",
|
||||
url: "<?=$this->make_url('admin', 'app', ['check_auth'])?>",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: {'auth_code': $('#auth_code_form').val()},
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
$('#csrf_token').attr('value', data.csrf_token);
|
||||
|
||||
$('#auth_code_error').html(data.error_form.username_error);
|
||||
$('#auth_code_error').html(data.error_form.auth_code_error);
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue