title: Unable to login using IdentityServer4 from JavaScript Client
body: <p>I have and .NET MVC core project which runs perfectly and is able to login using IdentityServer4 setup by me. However when I try to use the same IdentityServer to login using Javascript Client, I run into the error below: </p>
  
  <p><a href="https://i.stack.imgur.com/hb9Ck.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hb9Ck.png" alt="enter image description here"></a></p>
  
  <p>I am using <strong>oidc-client.js</strong> at JavaScript Client to achieve it. I have my allowCors setting in place to allow CORS. </p>
  
  <pre><code>            services.AddCors(options =&gt;
          {
              // this defines a CORS policy called "default"
              options.AddPolicy("default", policy =&gt;
              {
                       policy.AllowAnyOrigin()
                      .AllowAnyHeader()
                      .AllowAnyMethod()
                      .AllowCredentials();
              });
          });
  </code></pre>
  
  <p>Please help me if anyone ran through the same problem. I followed the tutorial from IdentityServer4 itself <a href="http://docs.identityserver.io/en/release/quickstarts/7_javascript_client.html" rel="nofollow noreferrer">http://docs.identityserver.io/en/release/quickstarts/7_javascript_client.html</a>. I have verified that everything is in place according to tutorial but facing issues with it.</p>
  
  <p>Here is the error being displayed in the browser console.</p>
  
  <p><a href="https://i.stack.imgur.com/4sCLx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4sCLx.png" alt="enter image description here"></a></p>