I have the following configuration:
devise :database_authenticatable config.http_authenticatable = true
on request:
http://user:password@localhost:3000/
Devise ignores the http auth login and redirects to login page
any thoughts?
Regards
I have the following configuration:
devise :database_authenticatable config.http_authenticatable = true
on request:
http://user:password@localhost:3000/
Devise ignores the http auth login and redirects to login page
any thoughts?
Regards
What http_authenticatable give you is the ability to use your HTTP Basic Authentication credentials to log into its own authentication system. You still need to code the http_auth block by yourself, like this:
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "foo" && password == "bar"
end
warden.custom_failure! if performed?
end
This code should go into your application controller. Make sure you are using warden.custom_failure!, otherwise the devise will enter an infinite loop of redirects.