Discourse as SSO provider for Prosody

I want to use Prosody as my xmpp-server in conjunction with Discourse. Users should be able to login to Prosody with their Discourse login within their desired xmpp-client, which will primarily be Conversations. For web-based clients like Converse.js or Candychat i could implement the discourse SSO feature. But for non-web apps, like Conversations or Gajim, are their any other solutions out there, especially when Discourse and Prosody runnning on the same server?

The only solution i found so far, is to write a Prosody authentication module in Lua that simulates a browser request, which was suggested here: [quote=“DeanMarkTaylor, post:9, topic:40584”]
You could always simply mimic the requests that a browser would make.
[/quote]

Is there something similar in Lua out there which i could use to start with or other approaches to solve this request?

1 Like

How did this work out?

https://gist.github.com/bangarangadang/4c4d50192ec2984cc6341664f5665f7b