admin管理员组

文章数量:1291044

I have migrated from ASP.NET Core 8 to .NET 9, and all authentication flows are working fine, also with Azure Entra ID.

But for custom on-premise deployments where there is no access to an OIDC server, I use an embedded OIDC service made with OpenIdDict (version 6.0). The tokens are encrypted using a RSA key.

Everything was working fine with .NET 8, but with .NET 9, the refresh token validation starts to fail after a server restart. Anybody got an idea what causes this?

OpenIddict.Server.OpenIddictServerDispatcher: Information: The response was successfully returned as a JSON document: {
  "error": "invalid_grant",
  "error_description": "The specified refresh token is invalid.",
  "error_uri": ";
}

I have migrated from ASP.NET Core 8 to .NET 9, and all authentication flows are working fine, also with Azure Entra ID.

But for custom on-premise deployments where there is no access to an OIDC server, I use an embedded OIDC service made with OpenIdDict (version 6.0). The tokens are encrypted using a RSA key.

Everything was working fine with .NET 8, but with .NET 9, the refresh token validation starts to fail after a server restart. Anybody got an idea what causes this?

OpenIddict.Server.OpenIddictServerDispatcher: Information: The response was successfully returned as a JSON document: {
  "error": "invalid_grant",
  "error_description": "The specified refresh token is invalid.",
  "error_uri": "https://documentation.openiddict/errors/ID2003"
}
Share Improve this question edited Feb 14 at 6:13 marc_s 755k184 gold badges1.4k silver badges1.5k bronze badges asked Feb 13 at 21:55 Niek JanninkNiek Jannink 1,1862 gold badges13 silver badges26 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I actually found what it is. I was regenerating the OIDC application registration on every restart. In the past with OpenIdDict pre version 6 this would work, but apparantly with the version 6 this means that also all stored tokens are invalidated.

本文标签: aspnet coreNET 9 OpenIddict refresh token invalidStack Overflow