Collabora online file share integrated in external site

I have set up Nextcloud 21 with collabora, which is working fine.
I’d like to integrate an external file share into another website via iFrame. I’ve managed to get it integrated (had to add the domain in /lib/public/AppFramework/Http/ContentSecurityPolicy.php) and it shows the document in ‘guest mode’, asking me to fill in a nickname.

Thing is, it doesn’t store anything I type in there, just stays at the input field.
image

If I try the same link in an incognito window, it proceeds correctly. So seems to be something with iFrames?

How can I get this to remember the input and forward to editing the document from outside Nextcloud?

Also, when I disable the share option that allows editting the document, I get an error when embedding the link: “collabora-domain refused to connect” - maybe that’s closer to the reason of the previous input field not working correctly. To be clear, it seems Nextcloud itself is being embedded just okay (as you can see in the header).

I’m running Collabora on a seperate domain without docker and added the domain from which I want to embed to the loolwsd.xml config…


What is the supposed way of embedding a nextcloud document / collabora editor in an external iFrame?