Sharing user and login data between Rails applications on Heroku

I am planning to create a group of several Rails applications on Heroku, and I want to share accounts, user data, and possibly some other information between these applications and the "main" Rails application. What would be the easiest and most efficient way to do this?

I heard that one way to do this is to force all applications to use the same database, but I'm not sure if this is really the best solution in my case, since I only need to share information between these applications.Another thing that I have considered is to use the CAS protocol , but it only seems like authentication (I cannot use it to get usernames and email). Suggestions?

+3


source to share


1 answer


This is how I do it.

Create a main application with user authentication.

Each sub app has omni auth with the main app.



Then the main application will host all user data, and the sub-application will receive the required authentication information plus the user data. I haven't figured out how to make sure the new user data is saved in the main application, but it looks like you would just send the user to the main application and then return them as soon as they enter the data.

Any suggestion from you from the Rails experts out there before I dive into this for a week.

+1


source







All Articles