I have a PostgreSQL database that I access from various locations, and would like to add an interface with Ruby on Rails 3. For authentication I need to login users with the same credentials used to create them directly in the database; is there a way to make Rails connect to the database each time with different username/password, based on the current user? Thanks for any hints!
Yes. Use a custom authentication on devise that makes a query to the underlying postgresql database.
See:
Custom authentication strategy for devise
I would certainly add some kind of filter to reduce the list of users that can authenticate this way.
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