[APPS] Use app host for OAuth authorization by sdkennedy2 · Pull Request #436 · DataDog/build-plugins · GitHub
Skip to content

[APPS] Use app host for OAuth authorization#436

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sdkennedy2/apps-oauth-authorize-app-host
Jun 24, 2026
Merged

[APPS] Use app host for OAuth authorization#436
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
sdkennedy2/apps-oauth-authorize-app-host

Conversation

@sdkennedy2

@sdkennedy2 sdkennedy2 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Apps upload OAuth currently builds the browser authorization URL on https://api.<site>/oauth2/v1/authorize. Datadog OAuth docs and other internal clients use the app host for browser authorization and the api host for token exchange. In the wrong-org upload investigation, this is one suspicious difference in our OAuth client flow.

Changes

Split the derived Datadog OAuth endpoints so browser authorization uses https://app.<site>/oauth2/v1/authorize, while the token exchange continues to use https://api.<site>/oauth2/v1/token.

This PR is intentionally narrow. It does not include token persistence changes or org-selection validation.

QA Instructions

Run an Apps upload that uses OAuth and confirm the browser opens the Datadog OAuth authorization flow on the app host.

Blast Radius

This affects Apps upload OAuth flows that rely on the default Datadog OAuth configuration. API key upload flows and callers that provide a custom OAuth config are unchanged.

Documentation

Copy link
Copy Markdown
Collaborator Author

@sdkennedy2 sdkennedy2 changed the title Add debug_id snippet injection in error tracking plugin [APPS][WIP] Use app host for OAuth authorization Jun 24, 2026
@sdkennedy2

Copy link
Copy Markdown
Collaborator Author

@codex review
@cursor review

@sdkennedy2 sdkennedy2 changed the title [APPS][WIP] Use app host for OAuth authorization [APPS] Use app host for OAuth authorization Jun 24, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

@sdkennedy2 sdkennedy2 marked this pull request as ready for review June 24, 2026 18:23
@sdkennedy2 sdkennedy2 requested review from a team as code owners June 24, 2026 18:23
@sdkennedy2 sdkennedy2 requested review from michaeldfoley and removed request for a team June 24, 2026 18:23

@srosenthal-dd srosenthal-dd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not sure it makes a difference, but seems safe enough to try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants