如何解决如何在 2.x 中捕获 msal 登录失败事件或无缓存权限错误
我正在使用 2.x MSAL Angular 库,并且在用户更改密码后登录时遇到问题,错误为:未找到缓存权限。我想捕获此事件并将用户重定向到登录屏幕,但找不到任何方法。请在下面找到错误详细信息:
我试过
'''
this.msalbroadcastService.msalSubject$
.pipe(
filter((msg: EventMessage) => msg.eventType === EventType.LOGIN_FAILURE || msg.eventType === EventType.HANDLE_REDIRECT_END),takeuntil(this._destroying$)
)
.subscribe((result: EventMessage) => {
debugger;
// Add your auth error handling logic here
});
this.authService.handleRedirectObservable().subscribe({
next: (result) =>
{
console.log(result)
},error: (error) => {
console.log(error)
},});
'''
但没有一个事件被触发。
库版本: "@azure/msal-angular": "^2.0.0-beta.5","@azure/msal-browser": "^2.14.1",
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。