This repository has been archived on 2024-06-14. You can view files and clone it, but cannot push or open issues or pull requests.
icynet-auth-server/views/settings/security.pug
2024-06-14 17:02:46 +03:00

53 lines
2.6 KiB
Plaintext

extends ./layout.pug
block title
|Security - Account settings | Icy Network
block settings
h1 Security
if message.text
if message.error
.alert.alert-danger
span #{message.text}
else
.alert.alert-success
span #{message.text}
.row
.col
h2 Change Password
form(method="post", action="/account/security/password", autocomplete="off")
div.form-container
input#csrf(type="hidden", name="_csrf", value=csrf)
input#username(type="text", name="username", value=user.username, autocomplete="username", style="display: none")
label.form-label(for="password") Current Password
input.form-control#password(type="password", name="password", autocomplete="current-password")
label.form-label(for="new_password") New Password
input.form-control#new_password(type="password", name="new_password", autocomplete="new-password")
small.form-hint At least 8 characters, a capital letter and a number required.
label.form-label(for="password_repeat") Repeat new password
input.form-control#password_repeat(type="password", name="password_repeat", autocomplete="new-password")
button.btn.btn-primary(type="submit") Change
.col
h2 Change Email Address
form(method="post", action="/account/security/email", autocomplete="off")
div.form-container
input(type="hidden", name="_csrf", value=csrf)
input#email_username(type="text", name="username", value=user.username, autocomplete="username", style="display: none")
label.form-label(for="current_password") Current Password
input.form-control#current_password(type="password", name="current_password", autocomplete="current-password")
label.form-label(for="current_email") Current Email Address
input.form-control#current_email(type="email", name="current_email")
small.form-hint Hint: #{emailHint}
label.form-label(for="email") New Email Address
input.form-control#email(type="email", name="email")
button.btn.btn-primary(type="submit") Change
h2 Two-factor authentication
.d-flex.flex-column.align-items-start
if twofactor
p Two-factor authentication is enabled.
a.btn.btn-primary(href="/account/two-factor/disable") Disable
else
p You can enable two-factor authentication using an authenticator app of your choice, such as Google Authenticator.
| By clicking activate you will be prompted with a QR code which you will need to scan with such app.
a.btn.btn-primary(href="/account/two-factor/activate") Activate