8

I'm looking at using discourse which uses omniauth for authentication. I need this to integrate with my current user base (where the currently auth either via email or facebook). One possiblity is to create a custom omniauth strategy (like https://github.com/intridea/omniauth-oauth2). I would be making some tweaks to the discourse code but would I need to implement my current app as Oauth2 provider? Or is there a simpler solution to this?

I know this is a bit open-ended; I guess I'm looking at the easiest way to add discourse to this app and have a million other things going on right now so very focused on the fastest for what seems like a fairly simple use case.

thx

timpone
  • 19,235
  • 36
  • 121
  • 211
  • This looks a lot like a duplicate of http://stackoverflow.com/questions/15393808/integrating-a-discourse-message-board-with-an-existing-rails-site – kwerle Sep 27 '14 at 20:28
  • thx, I asked that question too :) This question is over a year old. This looks like it would be the sol'n: https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045 I liked discourse but I think they should have made that functionality earlier. – timpone Sep 27 '14 at 21:36

1 Answers1

0

Going the OAuth2 route seems pretty reasonable.

An alternative would be to use the Omniauth Identity Strategy. [1] With the Omniauth Identity Strategy you could authenticate against your database by having read-only access. It's also possible to authenticate against an JSON API. [2]

[1] https://github.com/intridea/omniauth-identity [2] https://github.com/intridea/omniauth-identity#custom-auth-model

beanie
  • 1,428
  • 9
  • 14