Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Exception: The authentication response was rejected because the anti-forgery token was invalid. #22

Open
characharm opened this issue Feb 19, 2023 · 5 comments

Comments

@characharm
Copy link

2023-02-20 04:27:12 System.Exception: An error was encountered while handling the remote login.
2023-02-20 04:27:12 ---> System.Exception: The authentication response was rejected because the anti-forgery token was invalid.
2023-02-20 04:27:12 --- End of inner exception stack trace ---
2023-02-20 04:27:12 at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() 2023-02-20 04:27:12 at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync() 2023-02-20 04:27:12 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2023-02-20 04:27:12 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 2023-02-20 04:27:12 at SteamOpenIdConnectProvider.Startup.<>c__DisplayClass5_0.<<Configure>b__0>d.MoveNext() in /src/Startup.cs:line 110 2023-02-20 04:27:12 --- End of stack trace from previous location --- 2023-02-20 04:27:12 at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext) 2023-02-20 04:27:12 [22:27:12 ERR] Connection id "0HMOIP1A02N1Q", Request id "0HMOIP1A02N1Q:00000005": An unhandled exception was thrown by the application. 2023-02-20 04:27:12 System.Exception: An error was encountered while handling the remote login. 2023-02-20 04:27:12 ---> System.Exception: The authentication response was rejected because the anti-forgery token was invalid. 2023-02-20 04:27:12 --- End of inner exception stack trace --- 2023-02-20 04:27:12 at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync()
2023-02-20 04:27:12 at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync()
2023-02-20 04:27:12 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
2023-02-20 04:27:12 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
2023-02-20 04:27:12 at SteamOpenIdConnectProvider.Startup.<>c__DisplayClass5_0.<b__0>d.MoveNext() in /src/Startup.cs:line 110
2023-02-20 04:27:12 --- End of stack trace from previous location ---
2023-02-20 04:27:12 at Serilog.AspNetCore.RequestLoggingMiddleware.Invoke(HttpContext httpContext)
2023-02-20 04:27:12 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

@characharm
Copy link
Author

@Trojaner
Copy link
Member

If I remember correctly this happens when the site is not opened via HTTPS

@characharm
Copy link
Author

If I remember correctly this happens when the site is not opened via HTTPS

even in localhost?

@Trojaner
Copy link
Member

yes

@STRATZ-Ken
Copy link

Any update on this? Still getting about 90 users a day getting this error. I checked the defaults of .Net 6.0+ and those settings already seem to be the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants