[英]Login redirect a user with Azure AD B2C from an Angular application and msal.js
[英]Angular 8 with Azure B2C Authentication (using MSAL.js)
我正在尝试使用 Angular 8 和 Azure B2C 登录创建一个基本身份验证应用程序 (SPA)。 我在这里使用这个示例。
我已经为 SPA 配置了“应用程序注册”,但我不确定示例中的“Web API”是什么。 当我运行项目时,我可以登录,但在重定向到 Angular 后,我收到以下错误:
The application with ID '<MY_CLIENT_ID>' cannot get an ID token either because the openid scope was not provided in the request or the application is not authorized for it.
有人能帮助我吗?
谢谢
此示例有 2 种设置方法,或者使用他们的演示租户,您无需设置任何内容,只需运行即可。 或者,如果您在 spa 中设置自己的应用程序注册,看起来您就是这样,那么您还需要根据自述文件 Z5E056C500A1C4B6A7110.com/Azure/Z5E056C500A1C4B6A7110.com/Azure Samples/active-directory-b2c-javascript-nodejs-webapi所以你需要设置它,然后在 API 权限中,MY APIs 将显示在 SPA 应用程序注册中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.