One-click-connect for apps in the Discourse ecosystem

( #1

Hi Discourse team!

First off, thank you for building an amazing forum software, which I’ve used to build two businesses. :clap:

For DiscourseMetrics I use the Discourse API to generate metrics for community managers, and so far it has worked well. The API has barely changed which is great because I don’t worry about my import scripts breaking all the time :slight_smile:

I would ideally like to simplify the onboarding onto my service to make it easier for users to get started. As it is now, users sign up, add their API key and then my import scripts start running. But, its not trivial for users to select which permissions this API key has, and the admin/system key that most use gives my system full read/write access of their community. I’d prefer never having access to e-mails and other sensitive data. Sometimes I also need to figure out the customer’s username on their forum, because they generated the API key as a specific user, and not the default “system” user - a hassle for me and getting to the point of importing data takes much longer as I troubleshoot over e-mail with the potential customer.

So, my proposal is to have a way of connecting to and giving permission to apps in the Discourse ecosystem similar to the way Facebook apps do, by asking the user to connect and listing the permissions it needs:

(this is an old image, but you get the idea)

DiscourseMetrics is in some ways inspired by Baremetrics, that market themselves as a “zero-setup” solution or “One-click-analytics for Stripe” which is a great value proposition.

In any case, I think the current API-key way of doing is satisfactory (with some manual work), but adding a one-click-connect type feature to Discourse would reduce signup friction for my solution and perhaps others that will follow.

(David Taylor) #2

This already exists for the Discourse mobile apps. The only thing that would stop it working as described is that people would have to add your website’s URL to their allowed user api auth redirects site setting.

I don’t think it’s actually documented anywhere, so getting the app working would require reading through the source code of Discourse and DiscourseMobile.

( #3

Interesting David, thanks!