当我调用“msal-angular”的 MsalService.loginPopup 时,它自己的页面会像这样弹出。

当我从 customain 登录并尝试从默认域(从 Azure 静态 Web 应用程序发布)登录时会发生这种情况
import { Inject, Injectable } from '@angular/core';
import { MsalService } from '@azure/msal-angular';
import { LOGIN_REQUEST_TOKEN, LoginRequest, TOKEN_REQUEST_TOKEN, TokenRequest } from './config';
import { defer, from, Observable, of } from 'rxjs';
import { AuthResponse } from 'msal';
import { isIE } from './isIE';
export function checkClientLogin(): boolean {
return !!localStorage.getItem('isLogin');
}
const extraScopesToConsent = [ 'user.read', 'openid', 'profile' ];
@Injectable()
export class MsalAuthService {
constructor(
private msalService: MsalService,
) {
}
login(): Observable<AuthResponse> {
return defer(() => {
if (isIE) {
return this.msalService.loginRedirect({extraScopesToConsent});
} else {
return from(this.msalService.loginPopup({extraScopesToConsent}));
}
});
}
}