3

I am currently starting out with writing a new application that should be installed multiple times on the same server (on a per-client basis).

The systems themselves should be seperated, the problem is that I require them all to use the same authentication.

Is there a way for devise to look at another database for authenticating users or should I maybe look into ActiveResource with a dedicated users service?

Tigraine
  • 23,358
  • 11
  • 65
  • 110
  • http://stackoverflow.com/questions/8504530/device-activeresource ? – Fivell Jan 11 '12 at 10:01
  • Unfortunately not the answer I am looking for: I am not looking for federated login using OpenID but rather a shared users database for devise. My Usernames *have* to be in my DB and I even need to import them from a old system. (I already need to change devise a bit to authenticate usernames instead of emails) – Tigraine Jan 11 '12 at 10:07
  • exactly I'm searching for such solution too – Fivell Jan 11 '12 at 10:08

1 Answers1

1

Instead of having your user model use database_authenticable, you could write your own module (shared_database_authenticable) which looks up authentication info from the shared table. You can refer the database_authenticable code here

zsquare
  • 9,916
  • 6
  • 53
  • 87