Hi,
We are having a problem using the Zoom Meeting SDK with SSO inside an Electron application.
When the user wants to join a meeting, a popup page is opened with a login that is handled by our authentication provider. If the authentication is successfull, he is redirected to a Zoom page that contains the tk value: https://zoom.us/saml/externalAuth/XXX/YYYY
This page has a script that takes the tk (from a hidden input element) and calls the following function: window.opener.postMessage
to send the tk back to the page that is running the Zoom Meeting SDK.
Here is the snippet of code that does that:
if (tk) {
window.opener.postMessage(
{
type: 'ssoLoginSuccess',
tk: tk,
mtkGuid: mtkGuid,
},
sdkOrigin
); // sub window
setCookie('_zm_sdk_origin', '');
} else {
window.opener.postMessage(
{
type: 'ssoLoginFail',
tk: '',
},
sdkOrigin
);
setCookie('_zm_sdk_origin', '');
}
The problem is happening with the sdkOrigin
variable. Its value comes from the zm_sdk_origin
cookie that is set by Zoom and contains the address of the page in which the Meeting SDK is running.
In a regular web application, the Meeting SDK is running in a hosted page like and the _zm_sdk_origin
’s value is something like: https://my-wepage/zoom-meeting
.
However, in an electron application the Meeting SDK is running in a page that is inside the file system so the zm_sdk_origin
’s value should be something like: file:///path-to-my-page.html#zoom
, but its value is actually just: file:///
, which causes the window.opener.postMessage
function to fail to send the tk
information back to the Meeting SDK, which leaves the application perpetually waiting for the authentication to complete.
My guess is that this is a bug in the regular expression that is used to set the zm_sdk_origin
cookie value.
Can you help me with this?