Split "auth" and "user" routes
This commit is contained in:
parent
f3939c5016
commit
59b565ae19
15 changed files with 148 additions and 99 deletions
23
internal/dis/component/auth/panel/templates/totp_enroll.html
Normal file
23
internal/dis/component/auth/panel/templates/totp_enroll.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{{ template "_form.html" . }}
|
||||
{{ define "form/title" }}Enable TOTP{{ end }}
|
||||
{{ define "form/button" }}Enable{{ end }}
|
||||
{{ define "header" }}
|
||||
<p>
|
||||
<a class="pure-button" href="/user/">{{ .User.User }}</a> >
|
||||
<a class="pure-button pure-button-primary" href="/user/totp/enroll/">Enroll TOTP</a>
|
||||
</p>
|
||||
<p>
|
||||
<a class="pure-button pure-button-small" href="/auth/logout/">Logout</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ define "form/inside" }}
|
||||
<div>
|
||||
<a href="{{ .TOTPURL }}">
|
||||
<img src="{{ .TOTPImage }}" alt="TOTP Enrollment Image">
|
||||
</a>
|
||||
<ul>
|
||||
<li>scan the token above using a <a href="https://en.wikipedia.org/wiki/Time-based_one-time_password">TOTP</a> app on your phone</li>
|
||||
<li>enter your current password and the now generated token to confirm</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue