app/models/user.rb
# For Email and password Authentication:
# 1. in routes, remove the :skip hash for the devise_for rout
# 2. in devise initialiser, set params_authenticatable to true and http_authenticatable  to [:database]
# 3. here, add in :registerable, :confirmable, :recoverable, :rememberable to below
For Email and password Authentication:
1. in routes, remove the :skip hash for the devise_for rout
2. in devise initialiser, set params_authenticatable to true and http_authenticatable  to [:database]
3. here, add in :registerable, :confirmable, :recoverable, :rememberable to below
For Email and password Authentication : 1 . in routes remove the : skip hash for the devise_for rout 2 . in devise initialiser set params_authenticatable to true and http_authenticatable to [ : database ] 3 . here add in : registerable : confirmable : recoverable : rememberable to below
def valid_password?(password)
    begin
      super(password)
    rescue BCrypt::Errors::InvalidHash
      return false unless Devise::Encryptable::Encryptors::LegacyRestfulauthentication.digest(password, nil,nil,nil) == encrypted_password
      logger.info "User #{email} is using the old password hashing method, updating password to bcrypt."
      self.password = password
      true
    end
  end
def valid_password? ( password ) begin super ( password ) rescue BCrypt :: Errors :: InvalidHash return false unless Devise :: Encryptable :: Encryptors :: LegacyRestfulauthentication . digest ( password , nil , nil , nil ) == encrypted_password logger . info "User #{email} is using the old password hashing method, updating password to bcrypt." self . password = password true end end
For Email and password Authentication:
1. in routes, remove the :skip hash for the devise_for rout
2. in devise initialiser, set params_authenticatable to true and http_authenticatable  to [:database]
3. here, add in :registerable, :confirmable, :recoverable, :rememberable to below
For Email and password Authentication : 1 . in routes remove the : skip hash for the devise_for rout 2 . in devise initialiser set params_authenticatable to true and http_authenticatable to [ : database ] 3 . here add in : registerable : confirmable : recoverable : rememberable to below
password
<not_specific>