我正在开发Cordova应用程序,我正在寻找使用Azure AD B2C登录我的用户的解决方案。 Azure Cordova插件未显示与Azure AD B2C连接的选项。
我也测试了ADAL插件,但它不起作用。
context.tokenCache.readItems().then(function (items) {
if (items.length > 0) {
authority = items[0].authority;
context = new Microsoft.ADAL.AuthenticationContext(authority);
}
// Attempt to authorize the user silently
context.acquireTokenSilentAsync(resourceUri, clientId)
.then(authCompletedCallback, function () {
// We require user credentials, so this triggers the authentication dialog box
context.acquireTokenAsync(resourceUri, clientId, redirectUri)
.then(authCompletedCallback, function (err) {
alert("Failed to authenticate: " + err);
});
});
});
我的权限是:https://login.microsoftonline.com/tfp/[myTenant].onmicrosoft.com/B2C_1_SignUpOrSignIn
登录页面未显示但我有à服务器错误,404未找到。 (如果我点击网址,我也一样。)
编辑:20170912
在我使用权限之前:'login.microsoftonline.com/ [mytenant].onmicrosoft.com' 如文档中所示
我的登录页面是Azure AD的登录页面,而不是Azure AdB2C。
现在我已将autority更改为'login.microsoftonline.com/tfp/[mytenant].onmicrosoft.com/B2C_1_SignUpOrSignIn'
我的登录页面是404。 Picture