about summary refs log tree commit diff
path: root/gn_auth/auth
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-06-25 14:10:21 -0500
committerFrederick Muriuki Muriithi2026-06-25 14:10:21 -0500
commitf4e385a35017f95c43549bb852d5cab594796a6f (patch)
tree426a1a7d7d97488bde0381f0157cb99e4d5862a1 /gn_auth/auth
parent8979ceafa34edc366e5f4895afd6dbe3241d3a94 (diff)
downloadgn-auth-f4e385a35017f95c43549bb852d5cab594796a6f.tar.gz
Clear any related JWT tokens when deleting a client. HEAD main
Diffstat (limited to 'gn_auth/auth')
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2client.py b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
index dfe5d79..b3ec91f 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2client.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
@@ -298,6 +298,8 @@ def delete_client(
         cursor.execute("DELETE FROM authorisation_code WHERE client_id=?",
                        params)
         cursor.execute("DELETE FROM oauth2_tokens WHERE client_id=?", params)
+        cursor.execute("DELETE FROM jwt_refresh_tokens WHERE client_id=?",
+                       params)
         cursor.execute("DELETE FROM oauth2_clients WHERE client_id=?", params)
         return the_client