Я получаю сообщение об ошибке при попытке 'acquiresilenttoken' в 'MSAL', но я не могу выполнить 'handleRedirectCallback'. Я попытался добавить отладчик, но он никогда не заходит в «handleRedirectCallback», в чем может быть причина. Ниже приведен код, который я использую.
if (err ) {
//this.authService.logout();
debugger
this.authService.handleRedirectCallback((err:AuthError) => {
debugger
if (err) {
console.error('Redirect Error: ', err.errorMessage);
return;
}
debugger
this.authService.loginRedirect();
console.log('Redirect Success: ');
});
this.broadcastService.broadcast('msal:notAuthorized', err.message);
}
Мой MSALconfig:
"auth": {
"clientId": "xxx",
"authority": "https://login.microsoftonline.com/xxx",
"validateAuthority":"true",
"postLogoutRedirectUri": "http://localhost:44399/",
"navigateToLoginRequestUrl": true
},
"system":{
"loadFrameTimeout":10000
},
"cache": {
"cacheLocation": "localStorage"
}