File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
examples/servers/simple-auth/mcp_simple_auth Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ async def get_client(self, client_id: str) -> OAuthClientInformationFull | None:
8383 async def register_client (self , client_info : OAuthClientInformationFull ):
8484 """Register a new OAuth client."""
8585 self .clients [client_info .client_id ] = client_info
86-
86+
8787 async def has_client_consent (self , client : OAuthClientInformationFull ) -> bool :
8888 """Check if a client has already provided consent."""
8989 return self .client_consent .get (client .client_id , False )
90-
90+
9191 async def grant_client_consent (self , client : OAuthClientInformationFull ) -> None :
9292 """Grant consent for a client."""
9393 self .client_consent [client .client_id ] = True
@@ -275,6 +275,9 @@ def create_simple_mcp_server(settings: ServerSettings) -> FastMCP:
275275 enabled = True ,
276276 valid_scopes = [settings .mcp_scope ],
277277 default_scopes = [settings .mcp_scope ],
278+ # Because we're redirecting to a different AS during our
279+ # main auth flow.
280+ client_consent_required = True
278281 ),
279282 required_scopes = [settings .mcp_scope ],
280283 )
You can’t perform that action at this time.
0 commit comments