mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 06:06:24 +00:00
951309f76a
* Add support for U2F Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add vendor library Add missing translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Minor improvements Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F support for Firefox, Chrome (Android) by introducing a custom JS library Add U2F error handling Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F login page to OAuth Signed-off-by: Jonas Franz <info@jonasfranz.software> * Move U2F user settings to a separate file Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add unit tests for u2f model Renamed u2f table name Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix problems caused by refactoring Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add U2F documentation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Remove not needed console.log-s Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add default values to app.ini.sample Add FIDO U2F to comparison Signed-off-by: Jonas Franz <info@jonasfranz.software>
57 lines
1.7 KiB
Cheetah
57 lines
1.7 KiB
Cheetah
<h4 class="ui top attached header">
|
|
{{.i18n.Tr "settings.u2f"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<p>{{.i18n.Tr "settings.u2f_desc" | Str2html}}</p>
|
|
{{if .TwofaEnrolled}}
|
|
<div class="ui key list">
|
|
{{range .U2FRegistrations}}
|
|
<div class="item">
|
|
<div class="right floated content">
|
|
<button class="ui red tiny button delete-button" id="delete-registration" data-url="{{$.Link}}/u2f/delete" data-id="{{.ID}}">
|
|
{{$.i18n.Tr "settings.delete_key"}}
|
|
</button>
|
|
</div>
|
|
<div class="content">
|
|
<strong>{{.Name}}</strong>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
<div class="ui form">
|
|
{{.CsrfTokenHtml}}
|
|
<div class="required field">
|
|
<label for="nickname">{{.i18n.Tr "settings.u2f_nickname"}}</label>
|
|
<input id="nickname" name="nickname" type="text" required>
|
|
</div>
|
|
<button id="register-security-key" class="positive ui labeled icon button"><i class="usb icon"></i>{{.i18n.Tr "settings.u2f_register_key"}}</button>
|
|
</div>
|
|
{{else}}
|
|
<b>{{.i18n.Tr "settings.u2f_require_twofa"}}</b>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div class="ui small modal" id="register-device">
|
|
<div class="header">{{.i18n.Tr "settings.u2f_register_key"}}</div>
|
|
<div class="content">
|
|
<i class="notched spinner loading icon"></i> {{.i18n.Tr "settings.u2f_press_button"}}
|
|
</div>
|
|
<div class="actions">
|
|
<div class="ui cancel button">{{.i18n.Tr "cancel"}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{template "user/auth/u2f_error" .}}
|
|
|
|
<div class="ui small basic delete modal" id="delete-registration">
|
|
<div class="ui icon header">
|
|
<i class="trash icon"></i>
|
|
{{.i18n.Tr "settings.u2f_delete_key"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{.i18n.Tr "settings.u2f_delete_key_desc"}}</p>
|
|
</div>
|
|
{{template "base/delete_modal_actions" .}}
|
|
</div>
|
|
|