fix(auth): open regional OAuth on the site host - #868
Merged
Merged
Conversation
US3, US5, AP1, and AP2 serve the UI on the site host, not app.{site}.
Prefixing app. sends SAML login to a different browser session than the
assertion consumer, which Datadog rejects. Keep app. only for the bare
UI sites.
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
srosenthal-dd
approved these changes
Sep 28, 2026
srosenthal-dd
left a comment
Member
There was a problem hiding this comment.
LGTM! I did several local tests on a build from the branch and confirmed logins still work as expected on SAML and Google Login, for sites with and without custom subdomains, and sites with and without the app prefix.
amaskara-dd
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
OAuth login for regional sites now opens the authorize page on the site host itself (
https://us3.datadoghq.com/oauth2/v1/authorize), instead ofapp.{site}.app.is kept only for the bare UI sites:datadoghq.com,datadoghq.eu,datad0g.com, andddog-gov.com. API hosts are unchanged (api.us3.datadoghq.com).Motivation
On US3,
app.us3.datadoghq.comandus3.datadoghq.comare different browser sessions. SAML (Entra ID) posts the response tous3, which rejects it with an invalidInResponseTo. The same host layout applies to US5, AP1, AP2, and any other non-bare subdomain.Additional Notes
GovCloud stays on
app.ddog-gov.com. Bits and ACP use the same host helper, so they follow these UI hosts too.Checklist
Related Issues
Closes #855
Made with Cursor