RailsCasts Pro episodes are now free!

Learn more or hide this

Ioannis Karachristos's Profile

GitHub User: cedel

Comments by Ioannis Karachristos

Avatar

Hi Ryan, really nice episode. Have you ever tried to provide omniauth for two models in the same application (e.g. Manager and Employee) for the same provider?

The problem lies in the routes used by omniauth. There's a single entry point for both the authentication route and the callback (per provider), so there's no way to differentiate between the two models.

One potential solution, could be to provide a parameter during authentication (e.g. :type => "manager") and handle it during the callback.

Do you know of any other solution?