简体   繁体   中英

what parts are necessary for a custom omniauth oauth2 strategy for integrating with discourse

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM