Zoom SDK doesn't work with SSO inside Electron


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 successful, 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) {
      type: 'ssoLoginSuccess',
      tk: tk,
      mtkGuid: mtkGuid,
  ); // sub window
  setCookie('_zm_sdk_origin', '');
} else {
      type: 'ssoLoginFail',
      tk: '',
  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?

Which Web Meeting SDK version?

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Electron app which contains a React page that is loaded locally, using window.loadFile (you won’t be able to reproduce this with window.loadURL).
  2. Make sure that the Zoom Meeting is only available through an SSO login using a SAML integration.
  3. Build the Electron app and make sure that the React page is loaded locally.
  4. Open the Electron app and try to login.
  5. Notice that the login is stuck in this screen:


  • Device: MacbookPRO
  • OS: macOS 12.6
  • Browser: Chrome/104.0.5112.114 Electron/20.1.4 Safari/537.36

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.