Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)

Is there no way to test adding Discourse connect on the Hobby plan? I want to test this out before paying… However, I don’t see the settings options for enabling Discourse connect.

Edit: I’ve asked the Discourse assistant this same question and it looks to be the case. Correct it if its wrong though because I’d rather not pay for this until I know that I need to.

DiscourseConnect is available on the Pro plan. You can start a free trial on that plan and test it for free. (You will only be charged if you decide to start a paid subscription.)

2 likes

Is there any convention or rules how to encode user field names.

If my custom user fields are named as eg:

  • Šifra za kasu
  • Vaše radno mjesto

How I should format my payload Do i need to urlencode name or is enough to use snake case only

Nice to meet you.
I have two quetions and tasks to do about Hubspot.
Could you tell me how to set.

SSO Login: I want to do user log in into our HubSpot membership site, they are automatically logged into Discourse via SSO (If possible, I’d like to avoid using popups for the login process).

Embedded Functionality: I want to do once logged in, users to be able to use Discourse features (like posting comments and creating threads) directly within the HubSpot page, without leaving site.

Best regards.

We plan to allow users to change their email address on our main site (the SSO provider). We would like to update their email in Discourse at the same time, without them having to go to their Discourse preferences, and without them having to validate their new email with Discourse. What is the best way to implement this?

I experimented with updating their email like below, but that just added a secondary Discourse email which was pending validation. I want to change their primary Discourse email with no validation. Validation is performed by the main site.

curl -X PUT "https://discourse.example.com/u/$TARGET_USERNAME/preferences/email.json" \
     -H "Api-Key: $DISCOURSE_API_KEY" \
     -H "Api-Username: $DISCOURSE_USERNAME" \
     -H "Content-Type: application/json" \
     -d '{"email": "new-address@example.com"}'

Did you enable the auth_overrides_email site setting?

1 like

Not sure how I overlooked that- I did see the overrides for avatar, name, and username. Thanks!

1 like