diff options
author | Unknwon <u@gogs.io> | 2017-04-06 00:14:30 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 00:14:30 -0400 |
commit | a617d52374e937db0edacfba2a26bdd14a05538e (patch) | |
tree | 8c6448af2e4d68975ea66656b430e3b755e852c2 /templates/user/auth | |
parent | 624474386aa51b74fdbee04bb85aaa957a22b99c (diff) |
2fa: initial support (#945)
Diffstat (limited to 'templates/user/auth')
-rw-r--r-- | templates/user/auth/login.tmpl (renamed from templates/user/auth/signin.tmpl) | 0 | ||||
-rw-r--r-- | templates/user/auth/two_factor.tmpl | 28 | ||||
-rw-r--r-- | templates/user/auth/two_factor_recovery_code.tmpl | 28 |
3 files changed, 56 insertions, 0 deletions
diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/login.tmpl index b928f2bd..b928f2bd 100644 --- a/templates/user/auth/signin.tmpl +++ b/templates/user/auth/login.tmpl diff --git a/templates/user/auth/two_factor.tmpl b/templates/user/auth/two_factor.tmpl new file mode 100644 index 00000000..bbe12abf --- /dev/null +++ b/templates/user/auth/two_factor.tmpl @@ -0,0 +1,28 @@ +{{template "base/head" .}} +<div class="user signin two-factor"> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <h3 class="ui top attached center header"> + {{.i18n.Tr "auth.login_two_factor"}} + </h3> + <div class="ui attached segment"> + {{template "base/alert" .}} + <div class="required field"> + <label for="passcode">{{.i18n.Tr "auth.login_two_factor_passcode"}}</label> + <div class="ui fluid input"> + <input id="passcode" name="passcode" autofocus required> + </div> + </div> + + <button class="ui fluid green button">{{.i18n.Tr "settings.two_factor_verify"}}</button> + </div> + <p> + <a href="{{AppSubUrl}}/user/login/two_factor_recovery_code">{{.i18n.Tr "auth.login_two_factor_enter_recovery_code"}}</a> + </p> + </form> + </div> + </div> +</div> +{{template "base/footer" .}} diff --git a/templates/user/auth/two_factor_recovery_code.tmpl b/templates/user/auth/two_factor_recovery_code.tmpl new file mode 100644 index 00000000..a9ed17ee --- /dev/null +++ b/templates/user/auth/two_factor_recovery_code.tmpl @@ -0,0 +1,28 @@ +{{template "base/head" .}} +<div class="user signin two-factor"> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <h3 class="ui top attached center header"> + {{.i18n.Tr "auth.login_two_factor_recovery"}} + </h3> + <div class="ui attached segment"> + {{template "base/alert" .}} + <div class="required field"> + <label for="recovery_code">{{.i18n.Tr "auth.login_two_factor_recovery_code"}}</label> + <div class="ui fluid input"> + <input id="recovery_code" name="recovery_code" autofocus required> + </div> + </div> + + <button class="ui fluid green button">{{.i18n.Tr "settings.two_factor_verify"}}</button> + </div> + <p> + <a href="{{AppSubUrl}}/user/login/two_factor">{{.i18n.Tr "auth.login_two_factor_enter_passcode"}}</a> + </p> + </form> + </div> + </div> +</div> +{{template "base/footer" .}} |