【发布时间】:2019-12-23 15:13:13
【问题描述】:
我正在使用 hello.js for MSAL Microsoft Active Directory Library 来验证 Word Office Web 加载项的用户。它可以很好地返回到我原来的窗口。
这是我的基本设置
- 在 Word Web 插件中调用弹出对话框,然后在该弹出窗口中使用 loginRedirect 承诺函数。
- 效果很好!我使用我的 APPid 和租户 ID 进行身份验证。
- 一个观察结果是它需要一个 HTTPS 回复重定向 URL!!!!
- 但是,当它在成功登录后返回时,我的开发工具控制台中几乎没有错误
- 首先它找不到 html 元素,它返回 null 或 undefined
- 其次,当我单击 signIn() 并运行 loginRedirect 函数时,我看到了 Unable to get property 'then' of undefined or null reference
- 这个 hello.js 库来自https://github.com/AzureAD/microsoft-authentication-library-for-js
请告诉我为什么我在使用 var divWelcome = document.getElementById('WelcomeMessage'); 时得到 null 或 undefined ?
【问题讨论】:
-
您好,我通过重构代码解决了这个问题。