title: Always receiving 'invalid_client' error when POSTing to /Token endpoint with ASP Identity 2
body: <p>About a month ago I had a project working perfectly with ASP Identity OAuth. I'd send a POST request to the /Token endpoint with grant_type, username, and password, and all was dandy.</p>
  
  <p>I recently started a new project based off of Visual Studio 2013 RC2's SPA template. It's a bit different than the old template. Authentication is set up to pretty basic defaults,</p>
  
  <pre><code>OAuthOptions = new OAuthAuthorizationServerOptions
  {
      TokenEndpointPath = new PathString("/Token"),
      //AuthorizeEndpointPath = new PathString("/Account/Authorize"), 
      Provider = new ApplicationOAuthProvider(PublicClientId),
      AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
      AllowInsecureHttp = true
  };
  </code></pre>
  
  <p>Nothing significant changed from the default template. I can register accounts successfully through a Web API controller method I have implemented;</p>
  
  <pre><code>    // POST: /Account/Register
      [HttpPost]
      [AllowAnonymous]
      public async Task&lt;IHttpActionResult&gt; Register(RegisterBindingModel model)
      {
          if (ModelState.IsValid)
          {
              var user = new TunrUser() { UserName = model.Email, Email = model.Email, DisplayName = model.DisplayName };
              var result = await UserManager.CreateAsync(user, model.Password);
              if (result.Succeeded)
              {
                  return Created(new Uri("/api/Users/" + user.Id,UriKind.Relative), user.toViewModel());
              }
              else
              {
                  return BadRequest(result.Errors.First());
              }
          }
          return BadRequest(ModelState);
      }
  </code></pre>
  
  <p>However, no matter what I POST to the /Token endpoint, I <em>always</em> get the same response.</p>
  
  <pre><code>{"error":"invalid_client"}
  </code></pre>
  
  <p>Normally I pass the following request body</p>
  
  <pre><code>grant_type=password&amp;username=user%40domain.com&amp;password=userpassword
  </code></pre>
  
  <p>But this results in the same error. This worked in the previous VS2013 SPA template / Identity. What's changed?</p>
  
  <p>Thank you!</p>