skoruba / Duende.IdentityServer.Admin

The administration for the Duende IdentityServer and Asp.Net Core Identity ⚡
Apache License 2.0
541 stars 187 forks source link

IdentityServer.Admin AuthenticationFailureException: Correlation failed (Only in the new version) #204

Open mtlive opened 3 months ago

mtlive commented 3 months ago

Describe the bug

Can not login to IdentityServer.Admin service.

To Reproduce

Use http for all services. .NET SDK 8.0.101 It doesn't happen if you use localhost instead of IP. This problem only happens in version 2.

Relevant parts of the log file

[12:52:19 ERR] An unhandled exception has occurred while executing the request. Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login. ---> Microsoft.AspNetCore.Authentication.AuthenticationFailureException: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at NWebsec.AspNetCore.Middleware.Middleware.CspMiddleware.Invoke(HttpContext context) at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context) at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context) at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context) at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

What I've Tried Already

In Admin.UI\Helpers\StartupHelpers.cs : SameSiteMode.Lax for CookiePolicyOptions and all options for CookieSecurePolicy

mtlive commented 2 months ago

@skoruba May you take a look at this? Thank you

907080752 commented 2 months ago

me too

when i use ip ,that will exception correlation failed