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