Implements username authentication
It's now possible to login with either username or email That's necessary to be backward compatible for iChain login
This commit is contained in:
parent
aeb23ba914
commit
15c6ed127f
8 changed files with 44 additions and 18 deletions
|
|
@ -27,6 +27,7 @@
|
|||
= render 'devise/shared/openid'
|
||||
|
||||
= f.inputs name: 'Account' do
|
||||
= f.input :username, required: false, input_html: {autocomplete: "off"}
|
||||
= f.input :email, required: false, input_html: {autocomplete: "off"}
|
||||
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: {autocomplete: 'off'}
|
||||
= f.input :password_confirmation, input_html: {autocomplete: 'off'}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
Sign Up
|
||||
.panel-body
|
||||
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
||||
= f.input :username, required: true
|
||||
= f.input :email
|
||||
= f.input :name, required: true
|
||||
= f.input :password
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
Sign In
|
||||
.panel-body
|
||||
= semantic_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
||||
= f.input :email
|
||||
= f.input :login
|
||||
= f.input :password
|
||||
- if devise_mapping.rememberable?
|
||||
%p.text-right.small
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue