【发布时间】:2020-04-01 22:02:09
【问题描述】:
在我的 app.module.ts 中,我有 msal-angular 的配置:
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'ms-profile', component: MsProfileComponent, canActivate: [ MsalGuard ] }
]),
RouterModule,
MsalModule.forRoot({
auth: {
clientId: '7be72f7e-2433-4ef8-b1c7-9b1c91514659',
authority: 'https://login.microsoftonline.com//d566b150-219d-4312-ba59-3dca2f84a2ac',
validateAuthority: true,
redirectUri: 'http://localhost:4200/',
postLogoutRedirectUri: 'http://localhost:4200/',
navigateToLoginRequestUrl: true
}
}
)
]
通常(根据文档)我应该重定向到 aad(Azure Active Directory)的登录页面,但我总是会收到一个弹出窗口。在这种情况下,我想通过重定向进行身份验证。
【问题讨论】: