Use standard Devise sessions controller in admin area

Fixes a bug when retrying to login with correct credentials
This commit is contained in:
Artur Beljajev 2018-07-18 20:02:05 +03:00
parent a2451f4a13
commit 5561825584
8 changed files with 88 additions and 47 deletions

View file

@ -9,7 +9,8 @@ class AdminUser < User
ROLES = %w(user customer_service admin) # should not match to api_users roles
devise :database_authenticatable, :trackable, :validatable, :timeoutable
devise :database_authenticatable, :trackable, :validatable, :timeoutable,
authentication_keys: [:username]
def self.min_password_length
Devise.password_length.min