ASP.NET CORE 2.0 Facebook Bearer Authentication Without Identity

Viewed 523

Doubt: Does anyone know anything about creating login middleware with facebook without using identity? I have an application that uses Angular + ASP.Net core web API 2.0 and needed to create an authentication with Facebook, however, only encounter examples with identity, and examples that have no identity, are in old versions, which do not work anymore. I spent a few hours researching but I did not find anything. Can anyone help me, please?

In my startup class, i have this, my JWT authentication without facebook works normally

 services.AddAuthentication(authOptions =>
        {
            authOptions.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
            authOptions.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;

        }).AddJwtBearer(bearerOptions =>
        {
            bearerOptions.TokenValidationParameters = tokenValidationParameters;                
        }).AddFacebook(o => 
        {
            o.AppId = Configuration["facebook:appid"];
            o.AppSecret = Configuration["facebook:appsecret"];
            o.SignInScheme = "Bearer";
        });

But I want to know how to call some controller to do the authentication in facebook API and returns the token for me to save in claims identity for example.

0 Answers
Related