I have a question about how to approach integration design. I have two models Company and User . In my case, users will register for my application, and then the possibilities of connecting the application to their various accounts (Twitter, Facebook and LinkedIn) will be presented so that they can view / create messages / tweets / etc. Since Company has_many Users and social network accounts belong to the company, I want to associate the credentials with the Company model, using another model called Provider to store credentials, therefore allowing any user permission to access the companyโs social network account.
I follow various tutorials on setting up several omniauth providers, but they all focus on binding them to the user model and tell me to add devise :omniauthable to my user model.
How to make Company omniauthable instead of user? Do I even need to make my model irreconcilable if I do not allow the user to check / register omniauth browsing?
This is my first time you are building integration into social networks, so I hope my question makes sense. Thanks!
ruby-on-rails devise omniauth
ACIDSTEALTH
source share