ASP.NET CORE 2.0 Facebook media authentication without authentication

Doubt: Does anyone know anything about creating a middleware for logging into facebook without using authentication? I have an application that uses Angular + ASP.NET core web API 2.0 and is necessary for creating authentication with Facebook, however, I only encounter examples with a personality and examples that do not have an identifier, are in older versions that do not work anymore. I spent several hours but found nothing. Can someone help me please?

In my autoload class I have this, my JWT authentication without facebook works fine

 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";
        });

, , API facebook, , , , .

+4

Source: https://habr.com/ru/post/1689727/


All Articles