![](/img/trans.png)
[英]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.