File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/mcp/server/auth/handlers Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ async def _show_consent_form(self, request: Request) -> HTMLResponse:
3333 code_challenge = request .query_params .get ("code_challenge" , "" )
3434 response_type = request .query_params .get ("response_type" , "" )
3535
36+ # Get client info to display client_name
37+ client_name = client_id # Default to client_id if we can't get the client
38+ if client_id :
39+ client = await self .provider .get_client (client_id )
40+ if client and hasattr (client , 'client_name' ):
41+ client_name = client .client_name
42+
3643 # TODO: get this passed in
3744 target_url = "/consent"
3845
@@ -118,9 +125,10 @@ async def _show_consent_form(self, request: Request) -> HTMLResponse:
118125<body>
119126 <div class="consent-form">
120127 <h1>Authorization Request</h1>
121- <p>The application <strong>{ client_id } </strong> is requesting access to your resources.</p>
128+ <p>The application <strong>{ client_name } </strong> is requesting access to your resources.</p>
122129
123130 <div class="client-info">
131+ <strong>Application Name:</strong> { client_name } <br>
124132 <strong>Client ID:</strong> { client_id } <br>
125133 <strong>Redirect URI:</strong> { redirect_uri }
126134 </div>
You can’t perform that action at this time.
0 commit comments