如何使用 ASP.net Web API 上的 Azure ad b2c 从 Angular 2 Web 应用程序验证和授权令牌?

How to authenticate and authorize the token from Angular 2 web app using Azure ad b2c at ASP.net Web API?

我在客户端使用 angular 2,我想让消费者使用 Google、Facebook 等社交帐户登录

为此,我正在使用 Azure 广告 b2c。

我想使用来自 angular 2 网络应用程序的令牌保护网络 API。

我怎样才能做到这一点?

我已在 Angular 2 中尝试使用 msal 库(预览版)对使用 Azure ad b2c 的用户进行身份验证。但是我无法在 Web API.

上授权令牌

看到这个Angular 4 example w/ MSAL.js

此外,this blog post is a good guide for securing Web API. There's also a good sample project on GitHub: An ASP.NET Core 2.0 web API with Azure AD B2C