Angular Azure Active Directory B2C 身份验证 - CORS 问题

Angular Azure Active Directory B2C Authentication - CORS issue

我正在 Angular 中实施 Azure Active Directory B2C 身份验证。我正在使用 msal 拦截器连接 Azure AD B2C。身份验证请求失败并出现错误

Access to XMLHttpRequest at 'https://login.microsoftonline.com/...' from origin 'http://localhost/...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

我根据这个post配置了一切:https://medium.com/@sambowenhughes/configuring-your-angular-6-application-to-use-microsoft-b2c-authentication-99a9ff1403b3

那篇文章大约有两年的历史了,this.clientApplication.authority = "https://login.microsoftonline.com/tfp/" 看起来不对。它应该类似于 https://${b2cTenantName}.b2clogin.com/${b2cTenantName}.onmicrosoft.com/B2C_1_Sign_In.

您能否尝试配置 https://github.com/Azure-Samples/active-directory-b2c-javascript-angular-spa 中的 angular 示例应用程序并将其用作起点?