if I configure authentication with
.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
all works fine, but if I configure it
.AddAuthentication(options => {
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
})
Even after a succesful login, the user gets redirected to the logon page. I would expect the same behavior for both configs. Any thoughts ?
The problem was that I mixed using identity framework and custom claims/cookies. When I kicked out the use of the identityframework. It all worked as expected.
See more in this case.