Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(oauth): redis compatibility (#23959)

Mariesa7fe0e3f87a5
diff --git a/api/services/plugin/oauth_service.py b/api/services/plugin/oauth_service.py
index b84dd0afc50..055fbb81380 100644
--- a/api/services/plugin/oauth_service.py
+++ b/api/services/plugin/oauth_service.py
@@ -47,7 +47,9 @@ class OAuthProxyService(BasePluginClient):
if not context_id:
raise ValueError("context_id is required")
# get data from redis
- data = redis_client.getdel(f"{OAuthProxyService.__KEY_PREFIX__}{context_id}")
+ key = f"{OAuthProxyService.__KEY_PREFIX__}{context_id}"
+ data = redis_client.get(key)
if not data:
raise ValueError("context_id is invalid")
+ redis_client.delete(key)
return json.loads(data)