title: How to make CORS Authentication in WebAPI 2?
body: <p>The scenario is simple, I need to log in from another server (different from the API server) to retrieve the access token.</p>
  
  <p>I installed <code>Microsoft.Owin.Cors</code> package on the API Server. In <code>Startup.Auth.cs</code> file, under <code>public void ConfigureAuth(IAppBuilder app)</code>, I added in </p>
  
  <pre><code>app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
  </code></pre>
  
  <p>In <code>WebApiConfig.cs</code>, under <code>public static void Register(HttpConfiguration config)</code>, I added in these lines:</p>
  
  <pre><code>// Cors
  var cors = new EnableCorsAttribute("*", "*", "GET, POST, OPTIONS");
  config.EnableCors(cors);
  </code></pre>
  
  <p>What else should I change?</p>