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

The given key 'LogoutRequest' was not present in the dictionary #17

Open
andreakarasho opened this issue May 21, 2024 · 2 comments
Open

Comments

@andreakarasho
Copy link

Buongiorno,
riceviamo in produzione questo errore quando si tenta il logout:

System.Collections.Generic.KeyNotFoundException: The given key 'LogoutRequest' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at CIE.AspNetCore.Authentication.AuthenticationPropertiesExtensions.GetLogoutRequest(AuthenticationProperties properties)
   at CIE.AspNetCore.Authentication.CieHandler.HandleRemoteSignOutAsync()
   at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

Questa è la configurazione CIE:

"Provider": {
        "Name": "CIE Produzione",
        "OrganizationName": "CIE Produzione",
        "OrganizationDisplayName": "CIE Produzione",
        "OrganizationUrlMetadata": "https://idserver.servizicie.interno.gov.it/idp/shibboleth?Metadata",
        "OrganizationUrl": "https://www.interno.gov.it/it",
        "OrganizationLogoUrl": "",
        "SingleSignOnServiceUrlPost": "https://idserver.servizicie.interno.gov.it/idp/profile/SAML2/POST/SSO",
        "SingleSignOutServiceUrlPost": "https://idserver.servizicie.interno.gov.it/idp/profile/SAML2/POST/SLO",
        "SingleSignOnServiceUrlRedirect": "https://idserver.servizicie.interno.gov.it/idp/profile/SAML2/Redirect/SSO",
        "SingleSignOutServiceUrlRedirect": "https://idserver.servizicie.interno.gov.it/idp/profile/SAML2/Redirect/SLO",
        "Type": "StagingProvider"
      },
@danielegiallonardo
Copy link
Collaborator

Salve,
è probabile che il valore non sia più presente all'interno dei Cookie, probabilmente è una sessione rimasta aperta da troppo tempo, per cui i cookie ormai sono scaduti. Si verifica sistematicamente sul logout?

@andreakarasho
Copy link
Author

Purtroppo il problema avviene anche subito dopo aver effettuato il login. Si presente sempre e solo sul logout.
Anche SPID [tramite validator di test] ne è affetto seppur qualche volta da esito positivo.

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

2 participants