oAuth work with Discourse SSO
I'm trying to understand if Wild Apricot's SSO implementation will work out of the box with Discourse's oAuth SSO implementation, or if I need to develop a plugin for Discourse to authenticate with WA.
Discourse, a discussion platform, provides a built-in oAuth SSO client. There are screenshots of the configuration here - https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045
On Discourse, for the SSO URL, I have put in what I believe is the correct URL for the authorized application that I have made in our WA account:
https://abea.bike/sys/login/OAuthLogin?client_id=<WA CLIENT ID>&redirecturi=http%3A%2F%2Fdiscourse.cyclingsavvy.bike%2F&scope=contactsme&responsetype=authorizationcode&claimedaccountid=<WA ACCOUNT ID>
Where <WA CLIENT ID> is configured on the Wild Apricot admin site for oAuth applications, and where <WA ACCOUNT ID> is found in the billing/account dropdown.
Then, for SSO Secret, I put the Client secret that is found under Client ID in Wild Apricot.
When this is enabled, I am redirected to the correct login page on our WA site, but when I authenticate it goes to Discourse and my browser says there's a redirect loop. I assume this means that the correct information is not getting back to Discourse.
There is an open source plugin for Discource.
https://github.com/LeoMcA/discourse-wildapricot-auth
Great thanks to Eliot for sharing it.
The plugin is developed by third party and not maintained by Wild Apricot team.
-
That's great, thank you for contributing.
Is git user LeoMcA a developer of this plugin? If so I will contact him to find out what was missing in api documentation.
-
Eliot commented
I hired someone to create a plugin for Discourse to authenticate with WA. It is now available as open source. Hopefully someone else will find this useful.
https://github.com/LeoMcA/discourse-wildapricot-auth
FYI - The developer said the API documentation is missing important information. He had to look at the WordPress plugin for help.
-
If you have any questions on how WildApricot SSO works you can ask me here. I will try to help as much as I can.
-
Eliot commented
Ok, thanks for the feedback. That's the conclusion I was coming to as well. Hopefully can get a plugin created for Discourse to connect with WA's oAuth. If I am successful, I'll share it here.