title: How to authenticate Facebook JWT in .Net Core API
body: <p>I am in the process of creating a mobile app that allows users to log in via Facebook. Once logged in, the app holds on to a Bearer token used to make further requests. I am attempting to pass this token along to a C# .Net Core API. I'm attempting to write as little auth code as possible as doing it myself is prone to huge security issues.</p>
  
  <p>Currently my code in <code>Startup.cs</code> looks like this:</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
  
      app.UseJwtBearerAuthentication(new JwtBearerOptions {
          AuthenticationScheme = "Bearer",        
      });
  
      app.UseFacebookAuthentication(new FacebookOptions {
          AppId = "****",
          AppSecret = "****",
          SignInScheme = "Bearer"
      });
  
      app.UseMvc();
  }
  </code></pre>
  
  <p>With this, all requests return 401, even with a valid Bearer token. Now I'm not 100% sure <code>UseJwtBearerAuthentication</code> is even compatible with <code>UseFacebookAuthentication</code>, and if it is I'm sure I'm missing some code here. What steps should I take to get this working?</p>