Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple, Simultaneous Oauth in a Rails Application?

My end goal is for users to have multiple 3rd party authentications at the same time.

Right now, I am using Devise to create users. Users can sign up via email or facebook or google and it works. But now, after they have already signed up, I need them to also verify with, say, youtube or soundcloud. So the user was created with devise, but I also need them to verify with other things.

Since Devise hogs omniauth for it's own purposes, I can't use omniauth on the side.

As I see it I have three options:

  • Try to monkeypatch devise and get it to allow multiple authentications at the same time on one user
  • Do oauth by hand on the side adjacent to current Devise implementation
  • Scrap Devise and do something different

I would greatly appreciate any advice or other options

like image 879
mcclaskc Avatar asked Feb 15 '13 22:02

mcclaskc


1 Answers

I think this may be what you need: http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/

They open sourced their code too!

Provider: https://github.com/joshsoftware/sso-devise-omniauth-provider Client: https://github.com/joshsoftware/sso-devise-omniauth-client

Or even better, check out this: http://communityguides.heroku.com/articles/16

like image 96
FletchRichman Avatar answered Oct 01 '22 08:10

FletchRichman