# Is it possible to embed Discourse into a Salesforce Community (Experience Cloud site) using an iframe? If yes, how?

**URL:** https://meta.discourse.org/t/is-it-possible-to-embed-discourse-into-a-salesforce-community-experience-cloud-site-using-an-iframe-if-yes-how/402712
**Category:** Support
**Tags:** embedding, salesforce
**Created:** [11 במאי,‏ 2026,‏ 10:55pm UTC](https://meta.discourse.org/t/is-it-possible-to-embed-discourse-into-a-salesforce-community-experience-cloud-site-using-an-iframe-if-yes-how/402712 "2026-05-11T22:55:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pavel\_Kravets](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pavel_kravets/32/543103_2.png) [@Pavel\_Kravets](https://meta.discourse.org/u/Pavel_Kravets)
#### Post date: [11 במאי,‏ 2026,‏ 10:55pm UTC](https://meta.discourse.org/t/is-it-possible-to-embed-discourse-into-a-salesforce-community-experience-cloud-site-using-an-iframe-if-yes-how/402712/1 "2026-05-11T22:55:56Z")

</div>

I’m using the Business Trial and following this [article](https://meta.discourse.org/t/embed-discourse-as-a-full-comment-system-on-your-site/399743). LWC is being used as the wrapper for Discourse. Since LWC doesn’t allow adding the and tags to the HTML markup, I downloaded the JavaScript library from [myDiscourseAcc.discourse.group/javascripts/embed.js](http://myDiscourseAcc.discourse.group/javascripts/embed.js), saved it to my Salesforce org as a static resource, and loaded it into LWC.

The iframe displays, but it always shows the login page and the “Log in to Reply” button. But, I need to display the forum and all its features - I cannot do this.

1. In LWC, I specified discourseUrl, discourseEmbedUrl, and fullApp (set to true) for window.DiscourseEmbed.
2. The SF community site has been added in Admin → Embedding → hosts. Full App Mode is enabled.
3. [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) is working fine, and the necessary settings for it are also configured. I’ve come to this conclusion because I can access Discourse through SF-community, and I can automatically log in to Discourse using my community-user when I log in.
4. On the Salesforce org, Discourse has been added to Trusted URLs.
5. When logging into the community, no errors occur, neither in the SF-community’s logs nor in Discourse’s logs
6. When loading the community, I can set up a redirect to Discourse and back to obtain SSO and SIG via the URL
7. when I click a custom button or the “Log in to Reply” button (inside displayed discourse iframe), I can open Discourse in a separate window or a separate tab.
8. Salesforce Community and my Discourse instance are **on different domains**.

But despite this, the login page remains open inside the embedded iframe. I’m not sure, but the problem might be with the cookies

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [12 במאי,‏ 2026,‏ 3:48pm UTC](https://meta.discourse.org/t/is-it-possible-to-embed-discourse-into-a-salesforce-community-experience-cloud-site-using-an-iframe-if-yes-how/402712/4 "2026-05-12T15:48:53Z")

</div>

Your options are either:

1. Move Discourse and Salesforce site to share the same base domain, like `forum.yoursite.com` and `crm.yoursite.com`.

2. Change `same_site_cookies` from `Lax` to `None`. It involves [Using Hidden Site Settings](https://meta.discourse.org/t/using-hidden-site-settings/308773)
