File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ async def _register_oauth_client(
175175 auth_base_url = self ._get_authorization_base_url (server_url )
176176 registration_url = urljoin (auth_base_url , "/register" )
177177
178+ # Handle default scope
179+ if client_metadata .scope is None and metadata and metadata .scopes_supported is not None :
180+ client_metadata .scope = " " .join (metadata .scopes_supported )
181+
178182 # Serialize client metadata
179183 registration_data = client_metadata .model_dump (
180184 by_alias = True , mode = "json" , exclude_none = True
@@ -356,7 +360,7 @@ async def _perform_oauth_flow(self) -> None:
356360 if returned_state is None or not secrets .compare_digest (
357361 returned_state , self ._auth_state
358362 ):
359- raise Exception ("State parameter mismatch" )
363+ raise Exception (f "State parameter mismatch: { returned_state } != { self . _auth_state } " )
360364
361365 # Clear state after validation
362366 self ._auth_state = None
You can’t perform that action at this time.
0 commit comments