I have three RoR apps with the same users. It would be nice if they didn’t
have to create usernames and passwords for each…
What’s the best practice?
Create one users table, replicate it to the other apps
Create one users table, figure out how to get ActiveRecord to do
cross-database joins
Use LDAP ;^)
Have a backend “auth” table that each of the front ends talk to.
Only
keep the bare minimum in that table and put all the app specific profile
stuff in it’s own database.
Also, depending on how you’re using things you might not need to do
anything. We’ve got a section of our site split out into another
database. Only connection is that the the models for that section
“:have_one :user”.
It all just works as the queries tend to be: select * from my_models
where
user_id = 123.