Browse Source

Restore the state of tokens associated to authorizations after a failed application deletion

pull/2488/head
tedchirvasiu 3 months ago
committed by GitHub
parent
commit
8f8f300485
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs
  2. 5
      src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs

5
src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkApplicationStore.cs

@ -172,6 +172,11 @@ public class OpenIddictEntityFrameworkApplicationStore<
foreach (var authorization in authorizations)
{
context.Entry(authorization).State = EntityState.Unchanged;
foreach (var token in authorization.Tokens)
{
context.Entry(token).State = EntityState.Unchanged;
}
}
foreach (var token in tokens)

5
src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreApplicationStore.cs

@ -249,6 +249,11 @@ public class OpenIddictEntityFrameworkCoreApplicationStore<
foreach (var authorization in authorizations)
{
context.Entry(authorization).State = EntityState.Unchanged;
foreach (var token in authorization.Tokens)
{
context.Entry(token).State = EntityState.Unchanged;
}
}
foreach (var token in tokens)

Loading…
Cancel
Save