We are having issues with login in Zoom Contact Center Smart Embed.
Have tested smart embed inserted in a HTML file and it works fine, But when hosting the same file in a Web Server we cannot complete the login.
The contact center app is shown correctly, and when pressing the login button, another page is opened to provide the login credentials, the page : Sign In | Zoom
The login is done correctly, but the javascript on the page fails with this error:
9ed3f61a.js:3 Uncaught TypeError: Cannot read properties of null (reading ‘postMessage’)
The error happens on this function, located on this javascript file: 93d3f61a.js
function Ae() {
return Ae = Te(f().mark(function e(t) {
var r, n, a, i, s, o, u, c, l, m;
return f().wrap(function(y) {
for (; ; )
switch (y.prev = y.next) {
case 0:
return r = {},
y.next = 3,
nr();
case 3:
if (n = y.sent,
a = n.access_token,
i = n.x_zm_aid,
s = n.x_zm_haid,
o = n.x_zm_client_cluster_id,
!a) {
y.next = 13;
break
}
return y.next = 8,
It(Jt, {
data: {
checkOrigin: t
},
headers: {
Authorization: "Bearer ".concat(a),
“x-zm-aid”: i,
“x-zm-haid”: s,
“x-zm-client-cluster-id”: o
}
});
case 8:
u = y.sent,
c = Xt(u, 2),
l = c[0],
m = c[1],
!l && m && (r = n);
case 13:
qe(t, r);
case 14:
case “end”:
return y.stop()
}
}, e)
})),
Ae.apply(this, arguments)
}
try {
var or = window.opener.origin;
ar(or)
} catch {
window.addEventListener(“message”, function(t) {
var r = t.data
, n = t.origin;
r === “third-login-origin” && n && ir(n)
}),
window.opener.postMessage(“third-login-loaded”, “*”)
}
}
The error happens on the catch:
} catch {
window.addEventListener(“message”, function(t) {
var r = t.data
, n = t.origin;
r === “third-login-origin” && n && ir(n)
}),
window.opener.postMessage(“third-login-loaded”, “*”)
}
The authentication token is not provided to the original page with the smart embed, and the login page is never closed.
Any clue about what might be the cause for this?
I am hosting this webpage using ngnix and django.
Might there be some issue with HTTPS and CORS, or something similar?