I’m using the Business Trial and following this article. 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, 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.
- In LWC, I specified discourseUrl, discourseEmbedUrl, and fullApp (set to true) for window.DiscourseEmbed.
- The SF community site has been added in Admin → Embedding → hosts. Full App Mode is enabled.
- Discourse Connect is working fine, and the necessary settings for it are also configured.
- On the Salesforce org, Discourse has been added to Trusted URLs.
- When logging into the community, no errors occur, neither in the community’s logs nor in Discourse’s logs
- When loading the community, I can set up a redirect to Discourse and back to obtain SSO and SIG via the URL
- 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.
But despite this, the login page remains open inside the embedded iframe