Skip to content

Commit dc8f452

Browse files
committed
Fixes #123: allow usage of default_scope to be passed
Signed-off-by: Jesse Sanford <[email protected]>
1 parent 0cff354 commit dc8f452

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

fastapi_mcp/auth/proxy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ async def oauth_authorize_proxy(
199199
if not scope:
200200
logger.warning("Client didn't provide any scopes! Using default scopes.")
201201
scope = default_scope
202+
logger.debug(f"Default scope: {scope}")
202203

203204
scopes = scope.split()
205+
logger.debug(f"Scopes passed: {scopes}")
204206
for required_scope in default_scope.split():
205207
if required_scope not in scopes:
206208
scopes.append(required_scope)

fastapi_mcp/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ def _setup_auth_2025_03_26(self):
264264
client_id=self._auth_config.client_id,
265265
authorize_url=self._auth_config.authorize_url,
266266
audience=self._auth_config.audience,
267+
default_scope=self._auth_config.default_scope,
267268
)
268269
if self._auth_config.setup_fake_dynamic_registration:
269270
assert self._auth_config.client_secret is not None

0 commit comments

Comments
 (0)