Add two-factor authentication
- Add 2FA login interception in Session::setAuthenticatedForUser - Add 2fa session variable holding the last auth code
This commit is contained in:
parent
a7feb4bf9f
commit
d7e9b91181
7 changed files with 194 additions and 0 deletions
14
view/templates/twofactor/recovery.tpl
Normal file
14
view/templates/twofactor/recovery.tpl
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="generic-page-wrapper">
|
||||
<h1>{{$title}}</h1>
|
||||
<div>{{$message nofilter}}</div>
|
||||
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
|
||||
{{include file="field_input.tpl" field=$recovery_code}}
|
||||
|
||||
<div class="form-group settings-submit-wrapper">
|
||||
<button type="submit" name="action" id="confirm-submit-button" class="btn btn-primary confirm-button" value="recover">{{$recovery_label}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
15
view/templates/twofactor/verify.tpl
Normal file
15
view/templates/twofactor/verify.tpl
Normal file
|
@ -0,0 +1,15 @@
|
|||
<div class="generic-page-wrapper">
|
||||
<h1>{{$title}}</h1>
|
||||
<div>{{$message nofilter}}</div>
|
||||
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
|
||||
{{include file="field_input.tpl" field=$verify_code}}
|
||||
|
||||
<div class="form-group settings-submit-wrapper">
|
||||
<button type="submit" name="action" id="confirm-submit-button" class="btn btn-primary confirm-button" value="verify">{{$verify_label}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<div>{{$recovery_message nofilter}}</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue