mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 04:32:32 +00:00
added logging
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
"mcpServers": {
|
||||
"autopilot-monitor": {
|
||||
"type": "http",
|
||||
"url": "https://autopilotmonitor-mcp.kindwave-58b4b547.westeurope.azurecontainerapps.io/mcp"
|
||||
"url": "https://autopilotmonitor-mcp.kindwave-58b4b547.westeurope.azurecontainerapps.io/mcp",
|
||||
"oauth": {
|
||||
"clientId": "1a400946-62c1-4ab4-aa37-f730ac89704d"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,10 @@ export function createOAuthRouter(): Router {
|
||||
const body = new URLSearchParams();
|
||||
const params = req.body as Record<string, string>;
|
||||
|
||||
console.error(`[oauth/token] grant_type=${params.grant_type}, baseUrl=${baseUrl}, redirect_uri=${baseUrl}/oauth/callback`);
|
||||
console.error(`[oauth/token] client redirect_uri from request: ${params.redirect_uri ?? '(not sent)'}`);
|
||||
console.error(`[oauth/token] has code=${!!params.code}, has code_verifier=${!!params.code_verifier}, has refresh_token=${!!params.refresh_token}`);
|
||||
|
||||
body.set('client_id', CLIENT_ID);
|
||||
body.set('redirect_uri', `${baseUrl}/oauth/callback`);
|
||||
|
||||
@@ -133,6 +137,7 @@ export function createOAuthRouter(): Router {
|
||||
});
|
||||
|
||||
const data = await tokenResponse.json();
|
||||
console.error(`[oauth/token] Entra response status=${tokenResponse.status}`, tokenResponse.status !== 200 ? JSON.stringify(data) : 'OK');
|
||||
res.status(tokenResponse.status).json(data);
|
||||
} catch (err) {
|
||||
console.error('[oauth] Token exchange failed:', err);
|
||||
|
||||
Reference in New Issue
Block a user