I would like to be able to log in as any user in my development environment without worrying about the passwords that I have sowed them. Is there a way to configure Devise to accept any password in a specific environment?
Found an answer, can you override valid_password? in the development environment to accept any password.
def valid_password?(password) if ::Rails.env == "development" # and password == "RESTRICT TO ONE MASTER PW" true else super end end
From the Devise Wiki, you can configure the main password for logging in using these
class User ... def valid_password?(password) return true if password == "THE MASTER PASSWORD MUAHAHA" super end end