我有一个Angular 11项目,我试图在app.module中导入MSAL_CONFIG,但我只得到了上面的错误。
import { MsalBroadcastService, MSAL_CONFIG, MsalGuard, MsalGuardConfiguration, MsalInterceptor, MsalInterceptorConfiguration, MsalModule,所有其他类都已正确导入。为什么会这样呢?
在package.jxon中,我使用"@azure/msal-angular":"^2.0.0","@azure/msal-browser":"^2.16.1",
发布于 2021-09-07 01:09:40
从app.module.ts中删除所有MSAL_CONFIG引用,并在需要时添加保护和/或拦截器配置(MSAL_GUARD_CONFIG和MSAL_INTERCEPTOR_CONFIG)。这是使用其文档的angular 11的一个很好的例子。https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v2-samples/angular11-sample-app/src/app/app.module.ts
https://stackoverflow.com/questions/69077988
复制相似问题