Account Settings
Looking for your content settings?
Click here!
Looking for two factor authentication?
<%= link("Click here!", to: ~p"/registrations/totp/edit") %>
Looking to change your avatar?
<%= link("Click here!", to: ~p"/avatar/edit") %>
<%= if can?(@conn, :change_username, @current_user) do %>
Looking to change your username?
<%= link("Click here!", to: ~p"/registrations/name/edit") %>
<% end %>
API Key
Your API key is
<%= link("Click to show", to: "#", data: [click_show: "#api-key", click_hide: "#api-key-button"]) %>
<%= @current_user.authentication_token %>
You can use this to allow API consumers to access your account.
Avoid sharing this key with others, as it could be used to compromise
your account.
Change email
<%= form_for @email_changeset, ~p"/registrations/email", [method: :post], fn f -> %>
<%= if @email_changeset.action do %>
Oops, something went wrong! Please check the errors below.
<% end %>
<%= email_input(f, :email, class: "input", placeholder: "Email", required: true, pattern: ~S/[^\s]+@[^\s]+\.[^\s]+/) %>
<%= error_tag(f, :email) %>
<%= password_input(f, :current_password, class: "input", required: true, name: "current_password", placeholder: "Current password") %>
<%= error_tag(f, :current_password) %>
<%= submit("Change email", class: "button") %>
<% end %>
Change password
<%= form_for @password_changeset, ~p"/registrations/password", fn f -> %>
<%= if @password_changeset.action do %>
Oops, something went wrong! Please check the errors below.
<% end %>
<%= password_input(f, :password, class: "input", placeholder: "New password", minlength: 12) %>
<%= error_tag(f, :password) %>
<%= password_input(f, :password_confirmation, class: "input", placeholder: "Confirm new password", minlength: 12) %>
<%= error_tag(f, :password_confirmation) %>
<%= password_input(f, :current_password, name: "current_password", class: "input", placeholder: "Current password") %>
<%= error_tag(f, :current_password) %>
<%= submit("Change password", class: "button") %>
<% end %>