【发布时间】:2021-07-15 13:47:43
【问题描述】:
我正在尝试在 ionic 5 中实现 Microsoft SSO 身份验证。
执行以下代码时,控制台中会发生 Undefine。哪一部分有问题?
login(){
let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext('https://login.windows.net/common');
authContext.acquireTokenAsync('https://graph.windows.net', 'clientID', 'http://localhost:8200')
.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));
}
【问题讨论】:
标签: microsoft-graph-api msal ionic5 azure-ad-b2c-custom-policy