impress/app/views/devise/sessions/new.html.erb
Emi Matchu f483722af4 NeoPass strategy interacts with dev NeoPass server, which is still WIP
In this change, we wire up a new NeoPass OAuth2 strategy for OmniAuth,
and hook up the "Log in with NeoPass" button to use it!

The authentication currently fails with `invalid_credentials`, and
shows the `owo` response we hardcoded into the NeoPass server's token
response. We need to finally follow up on the little `TODO` written in
there!
2024-03-14 16:13:31 -07:00

33 lines
872 B
Text

<h2>Log in</h2>
<% if @can_use_neopass %>
<%= button_to "Log in with NeoPass",
auth_user_neopass_omniauth_authorize_path,
data: {turbo: false} # Turbo can't handle this redirect!
%>
<% end %>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :name, 'Username' %><br />
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
</div>
<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "current-password" %>
</div>
<% if devise_mapping.rememberable? %>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end %>
<div class="actions">
<%= f.submit "Log in" %>
</div>
<% end %>
<%= render "devise/shared/links" %>