From f4f6e41074fcf9b6071b5927065cbd22868e8515 Mon Sep 17 00:00:00 2001 From: Harry Date: Thu, 26 Jun 2025 13:27:34 +0800 Subject: [PATCH] feat(oauth): add oauth redirect_uri parameters --- api/core/plugin/impl/oauth.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/core/plugin/impl/oauth.py b/api/core/plugin/impl/oauth.py index b006bf1d4b..4338c9cf1f 100644 --- a/api/core/plugin/impl/oauth.py +++ b/api/core/plugin/impl/oauth.py @@ -15,6 +15,7 @@ class OAuthHandler(BasePluginClient): user_id: str, plugin_id: str, provider: str, + redirect_uri: str, system_credentials: Mapping[str, Any], ) -> PluginOAuthAuthorizationUrlResponse: response = self._request_with_plugin_daemon_response_stream( @@ -25,6 +26,7 @@ class OAuthHandler(BasePluginClient): "user_id": user_id, "data": { "provider": provider, + "redirect_uri": redirect_uri, "system_credentials": system_credentials, }, }, @@ -43,6 +45,7 @@ class OAuthHandler(BasePluginClient): user_id: str, plugin_id: str, provider: str, + redirect_uri: str, system_credentials: Mapping[str, Any], request: Request, ) -> PluginOAuthCredentialsResponse: @@ -61,6 +64,7 @@ class OAuthHandler(BasePluginClient): "user_id": user_id, "data": { "provider": provider, + "redirect_uri": redirect_uri, "system_credentials": system_credentials, # for json serialization "raw_http_request": binascii.hexlify(raw_request_bytes).decode(),