title: Social registration in SPA (Angular 2) with ASP.NET Core REST API
body: <p>I have implemented simple Angular 2 application which uses ASP.NET Core WebApi as backend. For authentication I added '/login' route that generates JWT access and refresh tokens that in turn stored by SPA in localStorage and used in HTTP requests.</p>
  
  <p>Now I want to integrate social registration function so users can login using ie Facebook button. From users's point of view I want to perform it into 3 steps:</p>
  
  <ol>
  <li>Click Register by Facebook button and redirected to Facebook website (to login and confirm my app request).</li>
  <li>Clicked confirm and redirected to my SPA where /registration page where his name already filled from Facebook profile</li>
  <li>Fills the remaining fields (like his favorite toy) and clicks "Finish registration"</li>
  </ol>
  
  <p>After this registration if user clicks register via facebook again he will be redirected to facebook (if he already logged in) he automatically redirected to server route that checks if such a user has been already registered and if it is then redirect him to SPA homepage</p>
  
  <p>How to correctly integrate such a workflow in my app? Note: I want to perform authentication and registration inside my Angular2 app, not on different auth server.</p>