forked from OpenNeo/impress
Emi Matchu
77057fe6a2
If you pass `?neopass=1` (or a secret value in production), you can see the "Log in with NeoPass" button, which currently takes you to OmniAuth's "developer" login page, where you can specify a name and email and be redirected back. (All placeholder UI!) We're gonna strip the whole developer strategy out pretty fast and replace it with one that uses our NeoPass test server. This is just me checking my understanding of the wiring!
33 lines
873 B
Text
33 lines
873 B
Text
<h2>Log in</h2>
|
|
|
|
<% if @can_use_neopass %>
|
|
<%= button_to "Log in with NeoPass",
|
|
auth_user_developer_omniauth_authorize_path,
|
|
data: {turbo: false} # important for developer strategy
|
|
%>
|
|
<% 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" %>
|