Skip to content

Commit 993457b

Browse files
committed
Refactor
1 parent a51ced2 commit 993457b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mcp/server/auth/handlers/authorize.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,14 @@ async def error_response(
244244
)
245245

246246
# Let the provider pick the next URI to redirect to
247-
response = RedirectResponse(
248-
url="", status_code=302, headers={"Cache-Control": "no-store"}
247+
return RedirectResponse(
248+
url=await self.provider.authorize(
249+
client,
250+
auth_params,
251+
),
252+
status_code=302,
253+
headers={"Cache-Control": "no-store"}
249254
)
250-
response.headers["location"] = await self.provider.authorize(
251-
client,
252-
auth_params,
253-
)
254-
return response
255255

256256
except Exception as validation_error:
257257
# Catch-all for unexpected errors

0 commit comments

Comments
 (0)