我正在尝试使用
Azure AD
开发我们应用程序的用户身份验证功能,但在此过程中遇到一些问题。我已经使用 client-flow
库实现了 ADAL
身份验证,但是当我尝试登录时,出现如下错误:
Error: User cancelled the flow RequestId:934620772 CorrelationId: 57a1ffe8-7612-49c4-b22d-2704eff74010
at fail (file:///android_asset/www/plugins/cordova-plugin-ms-adal/www/CordovaBridge.js:37:25)
at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:295:52)
at <anonymous>:1:9(anonymous function) @ main.js:121821_rejected @ utility.js:286Deferred.reject @ utility.js:368(anonymous function) @ AuthenticationContext.js:91_rejected @ utility.js:286Deferred.reject @ utility.js:368fail @ CordovaBridge.js:41cordova.callbackFromNative @ cordova.js:295(anonymous function) @ VM298:1
我们正在使用 Ionic 2 框架开发这个应用程序,该框架使用 Angular 2 和 TypeScript。我正在使用
cordova-plugin-ms-adal
库进行开发。
如果您能帮助我解决这个问题,我将不胜感激。
问题是我使用的“resourceUri”值,以便使用 ADAL 库 (cordova-plugin-ms-adal) 连接 Azure AD。
我正在使用我的 Azure 应用服务的 URI,但它真正需要的是 Graph API URI (https://graph.windows.net)。
at Br.s [as constructor] (msal-browser.min.js:2:4145)
at new Br (msal-browser.min.js:2:67586)
at Br.createUserCancelledError (msal-browser.min.js:2:66371)
at msal-browser.min.js:2:86314
(anonymous) @ HomePage.jsx:70
HomePage.jsx:72 User cancelled the authentication flow.```