forked from OpenNeo/impress
Emi Matchu
5cc219c795
including validation logic to make sure it's not already connected to another one! The `intent` param on the NeoPass form is part of the key! Thanks OmniAuth for making it easy to pass that data through!
38 lines
986 B
Text
38 lines
986 B
Text
<h2>Log in</h2>
|
|
|
|
<% if @can_use_neopass %>
|
|
🌟✨🌟✨🌟✨🌟✨🌟
|
|
<br />
|
|
<%= button_to "Log in with NeoPass",
|
|
auth_user_neopass_omniauth_authorize_path(intent: "login"),
|
|
data: {turbo: false} # Turbo can't handle this redirect!
|
|
%>
|
|
🌟✨🌟✨🌟✨🌟✨🌟
|
|
<br />
|
|
<br />
|
|
<% 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" %>
|