Use OpenIdConnectServer and try to connect to Facebook through API service
<p>I'm trying to figure out a way of making my API being able to associate a user from Facebook to my Identity users.</p>

<p><strong>The application context</strong></p>

<p>I'm developing a mobile application (In Xamarin) that needs to make login with Username/Password and with Facebook. I have already set the <code>app.UseOpenIdConnectServer</code> configuration and created the custom <code>Provider</code> so my application is already working with Username/Password.</p>

<p>Now I'm trying to make this integration with Facebook and not finding a way I can achieve this.</p>

<p>I was thinking in creating a service in the API like <code>/api/auth/login-facebook/</code> passing the <code>access-token</code> from Facebook but I need to return the <code>access-token</code> of my API application to the mobile application so the mobile app could call all the other services that needs authorization.</p>

<p>Any help about that?</p>

<p>A visual way of what I'm trying to get:</p>

<ol>
<li>User press "Login with Facebook" in Mobile Application</li>
<li>Mobile Application call the <code>/api/auth/login-facebook/</code> passing the <code>access-token</code> from Facebook</li>
<li>In the API Application, I will check the <code>access-token</code> with the <code>Facebook</code> package</li>
<li>If the user doesn't exists, I will create him with the data that Facebook returned me and after that I will generate the <code>access-token</code> to grant access to my API Application</li>
<li>If the user exists, I will generate the <code>access-token</code> to grant access to my API Application</li>
<li>Return the <code>access-token</code> to the Mobile Application so it can call the other services</li>
</ol>

<p>If my knowledge is wrong and I should do this integration/login in another way, please fell free to tell me!</p>