fix(mcp-oauth): allow configurable redirect_uri for MCP OAuth flows
This commit is contained in:
parent
7a78342ab3
commit
6297634d22
1 changed files with 2 additions and 2 deletions
|
|
@ -915,7 +915,7 @@ def _build_client_metadata(cfg: dict) -> "OAuthClientMetadata":
|
|||
)
|
||||
client_name = cfg.get("client_name", "Hermes Agent")
|
||||
scope = cfg.get("scope")
|
||||
redirect_uri = f"http://127.0.0.1:{port}/callback"
|
||||
redirect_uri = cfg.get("redirect_uri") or f"http://127.0.0.1:{port}/callback"
|
||||
|
||||
metadata_kwargs: dict[str, Any] = {
|
||||
"client_name": client_name,
|
||||
|
|
@ -942,7 +942,7 @@ def _maybe_preregister_client(
|
|||
if not client_id:
|
||||
return
|
||||
port = cfg["_resolved_port"]
|
||||
redirect_uri = f"http://127.0.0.1:{port}/callback"
|
||||
redirect_uri = cfg.get("redirect_uri") or f"http://127.0.0.1:{port}/callback"
|
||||
|
||||
info_dict: dict[str, Any] = {
|
||||
"client_id": client_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue