From 97e7960f494bd56daaa52b39a72d57c76331d485 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 23 Apr 2025 15:15:37 +0200 Subject: Add garbage collector and delete auth request on auth code exchange --- VPNAuth.Server/Api/OAuth2.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'VPNAuth.Server/Api') diff --git a/VPNAuth.Server/Api/OAuth2.cs b/VPNAuth.Server/Api/OAuth2.cs index 63dc115..66799e7 100644 --- a/VPNAuth.Server/Api/OAuth2.cs +++ b/VPNAuth.Server/Api/OAuth2.cs @@ -95,6 +95,8 @@ public static class OAuth2 Token = PkceUtils.GenerateToken(), Username = authRequest.Username }); + + db.AuthRequests.Remove(authRequest); db.SaveChanges(); await context.Response.WriteAsJsonAsync(new Token -- cgit v1.2.3