ASP.NET Core WebAPI + Ionic 2 social media authentication
<p>I followed the steps in the ASP.NET Core documentation to add Facebook/Google login to my application:</p>

<p><a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/</a></p>

<p>It works perfect as it is.</p>

<p>The problem is I would like to have an Ionic 2 client application (using Angular 2) and an ASP.NET Core API as the backend.</p>

<p>In the docs, after we configure the social media middlewares, their login buttons magically show in the MVC application.</p>

<p>Since ASP.NET Core MVC applications and WebAPIs are essentially the same thing, I think I could use this example, just changing the frontend.</p>

<p>I read a lot about authentication, Identity Server 4, JWT, OpenID, etc, but it is a very broad subject and I'm getting lost on what to focus on research...</p>

<p>So far, from what I understood, I will need the Ionic application to authenticate with the social provider. This will generate a token, that I should pass to the API, who will then validate this token with the social provider to grant access to its contents. Is this flow correct? How could I validate the received token in the API?</p>