title: ASP.NET Core 3.1 Identity with Web API project
body: <p>I have ASP.Net Core 2.2 project that we are upgrading to Core 3. I got the problem with authentication that I was able to reproduce in the scaffolded Core 3 project. I noticed that if I scaffold MVC or Angular template with Individual User Account, I don't get the error. Probably because it is going to the same port - not sure.</p>
  
  <p>And API template <em>doesn't</em> have the option of Store user accounts in-app. So I am using <code>ng new</code> plus scaffolded code in Angular template, and the back-end code generated by Web API template and it is running on a different port. </p>
  
  <p>Now the problems trying to add authentication to Angular:</p>
  
  <ul>
  <li>when I click on Register, IdentityServer register page <strong>does</strong> come up with URL <a href="https://localhost:44342/Identity/Account/Register?returnUrl=https://localhost:4200/authentication/login" rel="nofollow noreferrer">https://localhost:44342/Identity/Account/Register?returnUrl=https://localhost:4200/authentication/login</a> (44342 is the port of the back end), but all of the css or javascript return 404. For example, <code>https://localhost:44342/Identity/lib/bootstrap/dist/css/bootstrap.css net::ERR_ABORTED 404</code>. So the page is obviously unusable</li>
  <li>when I click Login, the page <strong>does not</strong> come up; I am getting <code>GET https://localhost:44342/.well-known/openid-configuration net::ERR_FAILED</code>. Needless to say that accessing this URL from the browser works fine. I also get another error right after: <code>Access to XMLHttpRequest at 'https://localhost:44342/.well-known/openid-configuration' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</code> Not sure if this is false positive or legit... all other APIs work through CORS without any problems</li>
  </ul>
  
  <p>I am not necessary asking for solution, but rather for some troubleshooting guidance. Most of the code that gets executed is IdentityServer code that I have trouble to control or debug. I haven't seen any docs that guide you through building independent front end and back end with new architecture where IdentityServer and OIDC is default implementation of the authentication.</p>