title: Authentication between mvc and webapi (Separate domains/Applications)
body: <p>im looking for good ideas/resources/implementations for the following scenario</p>
  
  <p>A MVC website at <a href="http://mywebsite.com" rel="nofollow noreferrer">http://mywebsite.com</a></p>
  
  <p>A Webapi REST service at <a href="http://myapi.com" rel="nofollow noreferrer">http://myapi.com</a></p>
  
  <p>IMPORTANT -- Please notice the separate domains/Applications.. </p>
  
  <p>A user logs in at the website and data is fetched from the API via JSONP/CORS</p>
  
  <p>Obviously i dont want the user to authenticate on the webapi using basic authentication. But the API is also exposed to Android/IOS apps, so i need the basic auth</p>
  
  <p>I've thought about returning a token from the MVC site and then writing a DelegatingHandler at the webapi site to authenticate using that token, but i would like some inputs, or perhaps even better solutions</p>
  
  <p>I made a pretty diagram just for the occation:</p>
  
  <p><img src="https://i.imgur.com/qoOdu.png" alt="Diagram"></p>