Open o-simardcasanova opened 1 year ago
Hey @simardcasanova 👋🏾
You're definitely right that DoG is designed to work with one Ghost instance! Fallback strategies to support multiple instances would be crazy 😁
Theoretically, it should be possible for DoG to pass labels to Discourse.
I'm not sure when I can get to it, so I'll include the (non-exhaustive) list of considerations/changes to be made if someone wants to add support.
DOG_GHOST_LABELS
- optional, comma-separated list of labels to be processed (meaning every label that's supported is opt-in)DiscourseSyncService#syncTiersToGroups
needs to be renamed and updated to support optional labels/members/api/member
endpoint doesn't return labels, session
mode will have to fetch member labels (if needed) using the Admin API and augment the responseGhostService#getMemberByEmail
needs to include member labels in the response (if required)SSOController#convertGhostMemberToDiscourseSSO
needs to map labels to Discourse group slugs (if there are any labels)getSlug
+ getNiceName
in the Discourse Service need to support both labels and tiers
The problem I'm trying to solve
First of all, thank you for this software! It's great, and it fills an important need in the Ghost ecosystem.
I'm currently running a Ghost-powered newsletter (let's call it
A
), and I'm planning to launch a second one soon (let's call itB
). My plan is to host both of their communities in the same Discourse instance. As far as I understand, DoG can only authenticate Discourse members against one Ghost instance. I'm assuming building support in DoG for multiple Ghost instances would be a lot of work.A workaround would be for me to host a third Ghost instance (let's call it
C
) that I would solely use as the source of trust for Discourse. I would use Zapier to sync members and their status. Members would get labels inC
based on their membership access inA
andB
, and would useC
to log in Discourse.Feature request
I'm wondering how easy it would be for DoG to use labels instead of (or in addition to?) membership tiers to sync members with groups in Discourse? If a member has the label
A_paid
, it would be added to the groupA_paid
in Discourse.Switching from membership tiers to labels could be an option to set in the configuration file, with the default value being the current behavior (membership tiers).
Alternatives
For what I understand, with a bit of extra code it seems possible to sync groups with user roles in WordPress. In this scenario,
C
is a WordPress instance with the Discourse plugin to offer SSO between WordPress and Discourse.Additional context
If something isn't clear, of if you need more details/explanations, do not hesitate. And once again, thank you for this software!