How would Auth work between Django and Discourse (working together)
<p>I need a modern looking forum solution that is self hosted (to go with a django project)</p>

<p>The only reasonable thing I can see using is discourse, but that gives me a problem... How can I take care of auth between the two? It will need to be slightly deeper than just auth because I will need a few User tables in my django site as well. </p>

<p>I have been reading about some SSO options, but I am unclear on how to appraoch the problem down the road. here is the process that I have roughly in my head... Let me know if it sounds coherent...</p>

<ol>
<li><p>Use Discourse auth (since it already has social auth and profiles and a lot of user tables.</p></li>
<li><p>Make some SSO hook for django so that it will accept the Discourse login</p></li>
<li><p>Upon account creation of the Discourse User, I will send (from the discourse instance) an API request that will create a user in my django instance with the proper user tables for my django site.</p></li>
</ol>

<p>Does this sound like a good idea? </p>

<p>That sounds plausible. To make sure a user is logged in to both, you may put one of the auths in front of the other. For example, if discourse is in front of Django, you can use something like the builtin RemoteUserMiddleware. </p>

<p>In general, if they are going to be hosted on different domains, take a look at JWT. It has been gainining ground to marry different services and the only thing you need is to be able to decode the JWT token, which a lot of languages have nowadays in the form of libraries. </p>

python django discourse