Skip to content

Commit

Permalink
feat: use :email for auth
Browse files Browse the repository at this point in the history
  • Loading branch information
anewman15 committed Dec 1, 2023
1 parent 224639e commit 23e828d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<%= f.error_notification %>
<div class="field">
<div class="control">
<%= f.input :name,
<%= f.input :email,
required: true,
autofocus: true,
input_html: { autocomplete: "name", class: "input" },
input_html: { autocomplete: "email", class: "input" },
wrapper: false,
label_html: { class: "label"} %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
config.authentication_keys = [:name]
config.authentication_keys = [:email]

# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
Expand Down

0 comments on commit 23e828d

Please sign in to comment.