sub claim is missing when login with different login page in the solution
Hi Team,
I have included the Identity Server as separate module in my another project. I have login screen which accepts username and password, When i am try to login with login page, I am getting subclaim is missing from IIdentityAuthenticationService.cs file (Line Number : 130)
I want to supress Identity Server SignInAsync method calling in Identity Server Module. How to do so ?
Kindly do the needful.
This usually happens when you don't have the default authentication scheme set to the same scheme you use on your login page.
Hi @RajasekarPR , have you resolved this bug? Can you guide me how to do? This is my code
services.AddAuthentication(options =>
{
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
.AddCookie(options =>
{
options.LoginPath = "/Account/Login";
options.AccessDeniedPath = "";
options.SlidingExpiration = true;
options.Cookie.Expiration = TimeSpan.FromDays(1);
})
.AddIdentityServerAuthentication("TestKey", options =>
{
options.Authority = "http://localhost:52398";
options.ApiName = "api1";
options.SupportedTokens = SupportedTokens.Both;
options.RequireHttpsMetadata = false;
})
This is in Login page
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal);
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.