Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,35 @@
"whitelist": [
{
"url": "https://login.teamviewer.com/oauth2/authorize",
"methods": ["GET"],
"timeout": 10
"methods": ["GET", "POST"],
"timeout": 10,
"settingsInjection": {
"client_id": {
"body": ["client_id"]
},
"client_secret": {
"body": ["client_secret"]
},
"global_access_token": {
"body": ["refresh_token"]
}
}
},
{
"url": "https://webapi.teamviewer.com/api/v1/.*",
"methods": ["GET", "POST", "PUT"],
"timeout": 10
"timeout": 10,
"settingsInjection": {
"client_id": {
"body": ["client_id"]
},
"client_secret": {
"body": ["client_secret"]
},
"global_access_token": {
"body": ["refresh_token"]
}
Comment on lines +80 to +82
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 64-66: The mapping of global_access_token to body parameter refresh_token appears incorrect. The global_access_token setting stores a JSON object containing both accessToken and refreshToken fields, not just the refresh token string.

This configuration will inject the entire JSON string where only the refresh token value is expected, causing OAuth token refresh requests to fail. The settingsInjection configuration needs to support JSON field extraction similar to the placeholder syntax used in the codebase: __global_access_token.json("[refreshToken]")__.

Copilot uses AI. Check for mistakes.
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/teamviewer/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const placeholders = {
GLOBAL_REFRESH_TOKEN: `__global_access_token.json("[refreshToken]")__`,
ACCESS_TOKEN: "[[oauth/global/access_token]]",
REFRESH_TOKEN: "[[oauth/global/refresh_token]]",
};
} as const;
Loading