3
votes

I have an application setup with devise authentication using sti (base user model and two other models - company and individual - inheriting from it). From a devise perspective, everything is working. I can have different routes for signup forms and everything works as expected. Now I wanted to give both users (company and individual) the option to signup/sign in using facebook or linked in. If I set the :omniauthable on both models, and set the devise_for on my routes.rb for each model, I get an error saying that only one model can be omniauthable. If I don't use the devise_for for each model, no routes are generated. If I set the omniauthable on user model only, I get only one route and one callback.

I've read somewhere that the solution would be to use omniauth on its own (separated from devise). However, I can't seem to achieve the intended behavior using omniauth separate from devise (I can get one single authorize/callback route, but the two, as intended).

Anyone out there who can help ?

TIA

1
I'm running into the same issue. Did you ever find a solution.Dex
I did manage to get it working, but to be honest I don't remember anymore what solution was applied :-) If you still need a hint, I can try to get my hands on that code again and check it out.Paulo
I figured it out. It was a typo on my part.Dex
Need some advice on same. Can anyo of you give some inputs/directions?nik-v
has anybody been able to figure this out ? @Dex ?Sandeep

1 Answers

0
votes