Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing User Data and Login Information between Rails Applications on Heroku

I'm planning to build a group of several Rails applications on Heroku, and I want to share accounts, user data, and maybe some other information between these applications and the "main" Rails app. What would be the easiest and most effective way of doing this?

I've heard that one way of doing this is to make all the applications share the same database, but I'm not sure if that's really the best solution in my case since I only need to share some information between these apps. Another thing I've considered is using the CAS protocol, but that only seems to handle authentication (I can't use it to get user's names and email addresses). Suggestions?

like image 942
Ajedi32 Avatar asked Dec 01 '25 14:12

Ajedi32


1 Answers

Here's how I'm considering doing this.

Create a master app with user authentication.

Have each sub-app do omni auth with the master app.

Then the master app will house all the user data, and the sub-app will get the authentication info necessary plus the user data. I haven't figured out how to make sure that new user data will be saved in the master app, but it seems like you would just send the user to the master app, then have them returned once they've entered the data.

Any suggesting from you Rails experts out there before I sink a week into doing it this way.

like image 154
bobbdelsol Avatar answered Dec 04 '25 08:12

bobbdelsol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!