Two User Database for Forum (Discourse) and App (Rails/Devise), SSO?

Hi Upcase,

I am asking for suggestions on some problem I am facing.
We have a rails app hosted in Heroku, but we have another forum (Discourse) on Digital Ocean.

How can I structure the system where our App user don’t have to signup twice?
I don’t want App user to sign up twice for the App and Forum.

We don’t want all Forum users to be an App users, but want all the App users to automatically be Forum users…

I hope I am making sense.

Any tips will be greatly appreciated!

Single Sign On (SSO) is a feature thats built into Discourse. In fact, we’re using it on this very forum with the Upcase app, and you have access to that code.

The relevant controller is here

It uses the DiscourseSignOn class.

Once your app has this functionality in it (the Upcase app also has specs for the functionality, be sure to look at them) then there are settings in the Discourse admin that you can enable to enable SSO against your Rails app.

Let me know if you have any more questions or issues with any of this. Good luck!



Hi @cpytel,
I’m getting a 404 when I click that link.

Perfect! Another reason why Upcase is so amazing. Thanks for the tip @cpytel!

These were some good read too for others who might implement SSO:
Official Discourse SSO:
Learn Discourse:

Please be sure you are logged into GitHub and then visit to visit the repositories for the first time to make sure you have access.

Thank you!