What parts are needed for omniauth oauth2 custom strategy for integration with discourse

I am considering using a discourse that omniauth uses for authentication. I need this to integrate with my current user base (where authorization is currently being performed by email or facebook). One possibility is to create a custom omniauth strategy (e.g. https://github.com/intridea/omniauth-oauth2 ). I would make some settings for the discourse code, but would I need to implement my current application as Oauth2? Or is there a simpler solution?

I know this is a little open; Iโ€™m probably looking at the easiest way to add discourse to this application and another million other things that are happening now, so Iโ€™m very focused on the fastest, which seems like a pretty simple use case.

THX

+7
ruby-on-rails omniauth discourse doorkeeper
source share
1 answer

Going to the OAuth2 route seems pretty reasonable.

An alternative would be to use an Omniauth identification strategy. [1] Using the Omniauth authentication strategy, you can authenticate against your database with read-only access. It is also possible for authentication against the JSON API. [2]

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

0
source share

All Articles