I am creating a mobile application that allows users to register via Facebook. After entering the system, the application is held on the carrier token used for subsequent requests. I am trying to pass this token along with the C # .Net Core API. I am trying to write as little authorization code as possible because it is subject to huge security issues.
Currently, my code in is Startup.csas follows:
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();
}
However, all requests return 401, even with a valid carrier token. Now I'm not 100% sure UseJwtBearerAuthenticationeven compatible with UseFacebookAuthentication, and if so, I'm sure that the code is missing here. What steps should I take to get this to work?