【问题标题】:msal-angularv2.0.4 IE11 not working with promise polyfillmsal-angularv2.0.4 IE11 不能与 promise polyfill 一起使用
【发布时间】:2021-10-26 15:25:32
【问题描述】:

我相信我们拥有https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-docs/ie-support.md 中提到的所有内容

我们在 index.html 的顶部包含了一个 promise polyfill:

 <script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js" class="pre"></script>

但是,当尝试在 IE11 中运行 Angular 应用程序时,我们得到:脚本 1002:语法错误

我们正在使用 ES5 构建应用程序,包括将 IE11 添加到 browserlist.rc,我也尝试过包含所有 core-js polyfills。

也许我在 Angular 的错误位置添加了 Promise polyfill?不过,我也尝试了一个 Angular Promise polyfill 包,但没有成功。

不知道为什么 IE11 根本没有加载,我相信这可能是 msal js 和 msal angular 的区别?

【问题讨论】:

  • 您的 Angular 应用程序是否可以在没有 MSAL 的 IE 11 中运行?你有没有提到this doc支持IE 11?错误指向哪一行代码?我建议您可以提供a minimal code snippet 可以重现问题,以便我们进行测试,看看如何提供帮助。
  • 应用程序在没有 msal 的情况下工作正常,错误只是指向 msal 库。 @玉舟
  • 请参考这个IE 11 sample。另外,请根据this doc详细检查您的项目,看看您是否满足所有要求。

标签: azure-active-directory internet-explorer-11 msal polyfills msal.js


【解决方案1】:

对于任何有类似问题的人:

我们使用 MSAL-angular v2.0.4 和 Angular 6。降级到 MSAL-angular v1.4.0 后,IE11 可以正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-07
    • 1970-01-01
    • 1970-01-01
    • 2019-08-04
    • 1970-01-01
    • 1970-01-01
    • 2017-03-25
    • 2020-03-23
    相关资源
    最近更新 更多