1

我正在使用 javascript firebase 库连接到 nest api。它在 Chrome 和 FireFox 中运行良好。但在 Internet Explorer(我使用的是 IE11)中,我得到一个脚本/websocket 错误。

SCRIPT12008: WebSocket Error: Incorrect HTTP response. Status code 401, Unauthorized

我连接到普通的 firebase 服务器/URL 没有问题。

我需要 IE 运行,因为其他人使用它。

有任何想法吗??

这是我用来连接到 Nest api 的代码

var dataRef = new Firebase('wss://developer-api.nest.com/');
dataRef.authWithCustomToken("{{user.token}}", function(error, authData) {
console.log("{{user.token}}");
  if (error) {
    console.log("Login Failed!", error);
  } else {
    console.log("Login Succeeded!", authData);
  }
});`
4

0 回答 0