title: Disable authentication in Asp.Net Core 3.0 for development
body: <p>How can I disable authentication during development for controllers that have an <code>[Authorize]</code> attribute?
  <a href="https://stackoverflow.com/questions/41112564/asp-net-disable-authentication-in-development-environment">Here</a> is an answer for .net core 2, but it uses <code>AddMvc()</code> which isn't in use in .net core 3.0.</p>
  <p>I tried this:</p>
  <pre class="lang-cs prettyprint-override"><code>    services.AddControllers().AddMvcOptions(opts =&gt; opts.Filters.Add&lt;AllowAnonymousFilter&gt;());
  </code></pre>
  <p>It still returned a 401; I don't know if that's even on the right track.</p>
  <h3>Update:</h3>
  <p>The previously linked post has been updated with answers that work with 3.x.</p>
  <p><a href="https://stackoverflow.com/questions/41112564/asp-net-disable-authentication-in-development-environment">Asp.net &quot;disable&quot; authentication in development environment</a></p>