ionic-framework - 在离子 4 中对 MSAdal 进行身份验证后,正确的重定向 URI 是什么?
问题描述
我的问题是:当我从 Ionic 4 应用程序进行身份验证时,我想将其重定向到应用程序根页面。authContext.acquireTokenAsync 的正确重定向 URI 是什么?我有一个错误。
来自微软的回答。
The reply url specified in the request does not match the reply urls configured for the application: '1111111111111111111111111111'.
我使用这样的代码。
let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');
authContext.acquireTokenAsync('https://graph.windows.net', 'ClinetID', 'http://localhost:8000','','')
.then((authResponse: AuthenticationResult) => {
console.log('Token is' , authResponse.accessToken);
console.log('Token will expire on', authResponse.expiresOn);
})
.catch((e: any) => console.log('Authentication failed', e));
解决方案
推荐阅读
- python - 在 PYTHON 中,如何关联数据框中的值以将它们都传递给 SQL 更新?
- react-native - 反应原生 react-native-google-places-autocomplete VirtualizedLists 警告
- pandas - Excel 计算列中是否包含在行中
- javascript - JavaScript:试图创建一个行为良好的后台作业,但在系统其余部分大部分空闲时运行时间太少?
- sql - 将 byte() 沿边字符串插入 SQL 数据库
- javascript - React-Native:提交时调度不起作用
- c# - 如何在 Visual Studio 2015 中安装 fontawesome.sharp 图标,我正在构建 Windows 窗体并需要 fontawesome.sharp 工具
- javascript - 在不使用循环的情况下使用 JavaScript 生成语言字符串的最简洁方法是什么?
- java - 配置 log4j - 没有任何效果
- css - 如何调整离子卡的高度?