<% content_for :title, t(".sign_in") %>

<%= t(".sign_in") %>

<% if Sso.enabled? %> <%= button_to t(".sign_in_with", so: Sso.label), "/auth/#{Sso::PROVIDER}", class: "btn-primary w-full justify-center", data: { turbo: false } %> <% end %> <% if Sso.password_login? %> <% if Sso.enabled? %>
<%= t(".or") %>
<% end %> <%= form_with url: session_path, class: "space-y-4" do |form| %>
<%= form.label :email_address, t(".email"), class: "label" %> <%= form.email_field :email_address, required: true, autofocus: !Sso.enabled?, autocomplete: "username", value: params[:email_address], class: "input" %>
<%= form.label :password, class: "label" %> <%= form.password_field :password, required: true, autocomplete: "current-password", maxlength: 72, class: "input" %>
<%= form.submit t(".sign_in"), class: (Sso.enabled? ? "btn-secondary" : "btn-primary") + " w-full justify-center" %>

<% if MailSettings.configured? %><%= link_to t(".email_me_a_sign_in"), new_sign_in_link_path, class: "link" %><% end %> <%= link_to t(".forgot_password"), new_password_path, class: "link" %>

<% end %> <% end %>