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
This worked for me
before_filter :check_auth
def check_auth
authenticate_or_request_with_http_basic do |username,password|
resource = User.find(username)
if resource.valid_password?(password)
sign_in :user, resource
end
end
warden.custom_failure! if performed?
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With