title: Getting 400 Error while Authenticating user credentials using fetch API
body: <p>I am using asp.net core as backend and react as a front-end. I am using fetch API to authenticate user credentials.</p>
  <p>But when I am trying to log in I am getting a 400 error. Everything is working fine on the postman.</p>
  <p>Here is my react code:</p>
  <pre><code> const submitLoginForm = async (e) =&gt; {
      e.preventDefault();
      await fetch(&quot;https://localhost:44316/api/auth/login&quot;, {
        method: 'POST',
        headers: {&quot;Content-Type&quot;: &quot;application/json&quot;},
        credentials: 'include',
        body: JSON.stringify({
          email,
          password,
        })
      });
  
      setRedirectTo(true);
  
    };
  </code></pre>
  <p>I am calling the above function on form submit.</p>