title: Specifying Client secrets in JwtBearerOptions for Azure Active Directory authentication
body: <p>If I create a new ASP.NET Core MVC application in Visual Studio 2017, I can add client secrets with one line to <code>AzureAdServiceCollectionExtensions</code>:</p>
  <pre class="lang-cs prettyprint-override"><code>public void Configure(string name, OpenIdConnectOptions options)
  {
      options.ClientId = _azureOptions.ClientId;
      // Add this line below
      options.ClientSecret = _azureOptions.ClientSecret;
      options.Authority = $&quot;{_azureOptions.Instance}{_azureOptions.TenantId}&quot;;
      options.UseTokenLifetime = true;
      options.CallbackPath = _azureOptions.CallbackPath;
      options.RequireHttpsMetadata = false;
  }
  </code></pre>
  <p>The configuration POCO is already wired up to take it from the config file.</p>
  <p>On the other hand, in Web API projects, authentication uses JWT Tokens and the code generated by Visual Studio is different:</p>
  <pre class="lang-cs prettyprint-override"><code>public void Configure(string name, JwtBearerOptions options)
  {
      options.Audience = _azureOptions.ClientId;
      options.Authority = $&quot;{_azureOptions.Instance}{_azureOptions.TenantId}&quot;;
  }
  </code></pre>
  <p>I'm not sure where in the <code>JwtBearOptions</code> to put the client secret.</p>