Couldn’t find a guide for this. But what I’d like to do is to “integrate” Discourse as an “app” inside the open source collaborative environment Nextcloud. I believe this is done by opening Discourse - kind of like an iframe - as an “external site” in Nextcloud. These are my steps:
I log out from both Discourse and Nextcloud. Log in to Nextcloud (using the same email at both Nextcloud and Discourse), but cannot successfully open the “external site” to reveal my Discourse forum.
I’ve tried disabling SSO, but the subdomain where my forum is located still cannot be opened within Nextcloud. My regular domain name does however open.
By CSP you mean the Cloud Service Provider where my Discourse is at?
Your links may or may not work correctly due to the various ways that Web browsers and Web sites handle HTTP and HTTPS URLs, and because the External Sites app embeds external links in IFrames.
Discourse does not work in an <iframe> tag and your Discourse server will refuse the connection.
Thank you! But why then is there a “SSO integration” app, if the integration is impossible? Is there some workaround to allow for Discourse to be embedded as an iframe?
Edit: I created a post at the Nextcloud forum now. Will report back if I get any clarity from there.
Sorry for the late response here but I have been exploring nextcloud and discourse integration options recently. You’ve probably figured all this out by now but I’d be interested to compare notes. Are you still using discourse and nextcloud together and if so can you share some more info on what you’re trying to achieve and how it’s working out for you? I’d appreciate it!
Yes, as you have learned, Discourse does not like to be loaded in an iframe. It has always been this way. The workaround is to use Discourse’s own very flexible theming system to add a header that matches your main site. You can also then use nextcloud’s theming system to update it to match, as you see fit. In the nextcloud external sites admin setting, you’ll then select the redirect option meaning the site does not allow embedding. The link to discourse will then open in the same browser tab, without the iframe.
The Nextcloud discoursesso app you refer to is just about allowing people to authenticate to your discourse site via Nextcloud. Looks like you are setting it up correctly. You just need to go to the URL of your discourse and try to log in, and you will see you are logged in using your nextcloud credentials.
Note that in Discourse, Discourse SSO has been renamed to Discourse Connect. Enabling it will totally replace any other login options in your discourse so you will want to use it carefully.