Identity wraz z Facebook`iem

0

Witajcie programiści..
Otóż do swojego mechanizmu logowania chciałem dodać logowanie poprzez facebook`a. Sprawa wygląda tak, że identity działało ale po dodaniu facebooka(logowanie przez facebooka działało) przestało działać identity...

Dodałem taki kod:

            services.AddAuthentication(options =>
            {
                options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            }
            )
            .AddFacebook(facebookOptions =>
            {
                facebookOptions.AppId = "637396096744159";
                facebookOptions.AppSecret = "99b00bc0e2f913a82214ff0c3e16bc94";
                facebookOptions.SaveTokens = true;

            }).AddCookie();

Co zabawne po zakomentowaniu tych ustawień:

                options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;

Identity działa ale niestety nie działa logowanie przez FB. Ktoś miał podobny problem? Domyślam się, że nadpisałem jakieś ustawienia, które są dla identity kluczowe. niestety nie wiem jakie.
Pozdrawiam

0

Zapomniałem w sumie dopisać a z pewnością będzie to ułatwienie.
Inne konfiguracje cookies

            services.Configure<CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddSession(options =>
            {
                options.Cookie.Name = "DDDDDDD";
                options.IdleTimeout = TimeSpan.FromMinutes(30);
                options.Cookie.HttpOnly = true;
                // Make the session cookie essential
                options.Cookie.IsEssential = true;

            });

1 użytkowników online, w tym zalogowanych: 0, gości: 1