Iframe integration: Sending commands

I’m trying to use Rocket.Chat in the backend of a website for communication between authors. I’ve gotten the Rocket.Chat server up and running just fine, I’ve got a SSO working just fine with the website, however, I’m using Rocket.Chat in an iframe on a specific page in the backend, and I wanted to have it attempt to log in automatically since the individual has already signed into their SSO to get there. I’m having trouble with the iframe auth command, “call-custom-oauth-login”. Here is a snippet of my code, not sure what I’m doing wrong or if I’m missing params.

<iframe width='100%;' id="iframeId" onload="authenticateIFrame()" height='100%' src="https://myrocketchatdomain.com/channel/general" frameborder="0" SameSite=none onmousewheel="" style="background: transparent;"></iframe>

function authenticateIFrame() {
    document.getElementById('iframeId').contentWindow.postMessage({
        externalCommand: 'call-custom-oauth-login',
        service: 'test'
    }, '*');
}

‘Test’ being the name of the oAuth I created inside Rocket.Chat and yes I have iFrame enabled on the backend of Rocket.Chat as the externalCommand: ‘logout’ works great.

Any help would be greatly apricated, I’ve been struggling with this quite a bit haha

Figured it out. Thanks

Hey Dobbular, does this cause a popup for you?