Using Discourse as SSO for desktop app

AI-generated summary

Marc_Montecalvo is trying to use Discourse as an SSO provider for a C# WPF desktop app, leveraging Azure AD for Discourse login. They need to retrieve user group memberships from Discourse for app permissions but are unable to adapt the web-based Discourse SSO solution (Biarity/DiscourseSso) for desktop use. They’re seeking help on the necessary API calls, preferably demonstrated in Postman.

So I’ve read over the Use Discourse as an identity provider (SSO, DiscourseConnect) article and it seemed to be what I needed. But I seem to have hit a roadblock and can’t get it actually working. Here is a little about my setup and my goals.

My Discourse server is using my Azure AD for its login and that works great. I have a desktop app that I’m writing (c# wpf) that needs to use Discourse to log in. Why use discourse and not Azure? I can’t create or edit the security groups in Azure unfortunately. So instead I need to get the group membership for the users from Discourse since the permissions for the various tools in the app are based off those groups.

I tried using GitHub - Biarity/DiscourseSso: Easy, configurable Discourse SSO: GET /auth/login -> recieve a JWT with user data · GitHub and as a stand alone tool it works. But it is really for a web app and I can’t get it to work on my desktop app.

If anyone has setup something like this and can help that would be great. If anyone has the calls I need to make in Postman I’d love to see how it is being done there.

Thanks!

2 Likes