Skip to content

fix(oauth): move client secrets from URL query params to POST body#346

Open
Arjxm wants to merge 1 commit intowithoneai:mainfrom
Arjxm:fix/oauth-secrets-query-params
Open

fix(oauth): move client secrets from URL query params to POST body#346
Arjxm wants to merge 1 commit intowithoneai:mainfrom
Arjxm:fix/oauth-secrets-query-params

Conversation

@Arjxm
Copy link
Copy Markdown

@Arjxm Arjxm commented Feb 22, 2026

This pull request updates the OAuth flows for Jira and Zoho integrations to use form-encoded POST requests instead of query parameters, improving standards compliance and security. It also introduces the qs library for request serialization and updates dependencies accordingly.

Dependency updates:

  • Added qs and its type definitions to core/oauth/package.json for request body serialization.

Jira integration improvements:

  • Updated core/oauth/src/connections/jira/init.ts to use a form-encoded POST request for token exchange, replacing the previous use of query parameters. [1] [2]
  • Updated core/oauth/src/connections/jira/refresh.ts to use a form-encoded POST request for token refresh. [1] [2]

Zoho integration improvements:

  • Updated core/oauth/src/connections/zoho/init.ts to use a form-encoded POST request for token exchange, replacing the previous use of query parameters. [1] [2]
  • Updated core/oauth/src/connections/zoho/refresh.ts to use a form-encoded POST request for token refresh. [1] [2]

@Arjxm Arjxm requested a review from moekatib as a code owner February 22, 2026 19:31
@Arjxm Arjxm force-pushed the fix/oauth-secrets-query-params branch from 7c4f0bb to 688a151 Compare February 22, 2026 19:38
Zoho and Jira OAuth implementations were passing client_secret in URL
query parameters, which exposes credentials in:
- Server access logs
- Proxy/CDN logs
- Browser history
- Referer headers

Changes:
- zoho/init.ts, zoho/refresh.ts: Use form-urlencoded POST body
- jira/init.ts, jira/refresh.ts: Use JSON POST body (per Atlassian docs)
- package.json: Add qs and @types/qs as explicit dependencies

Verified against official API documentation:
- Zoho: https://www.zoho.com/crm/developer/docs/api/v6/access-refresh.html
- Jira: https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/
@Arjxm Arjxm force-pushed the fix/oauth-secrets-query-params branch from 688a151 to ab940e6 Compare February 22, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant