✨ [FFL-2597] Feature Flags tab — OAuth sign-in (stacked PR 1 of 3) - #4913
✨ [FFL-2597] Feature Flags tab — OAuth sign-in (stacked PR 1 of 3)#4913kellyw1806 wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
f6766af to
5375214
Compare
Bundles Sizes Evolution
|
|
|
I have read the CLA Document and I hereby sign the CLA |
|
@codex review |
5375214 to
bc5e1d9
Compare
| // chrome.storage.session (cleared when the browser session ends) — never persisted to disk. | ||
| // See FFL-2596 / the OAuth CLI client `13c94d15-067d-4263-a309-be4811141419` (staging). | ||
|
|
||
| const CLIENT_ID = '13c94d15-067d-4263-a309-be4811141419' |
There was a problem hiding this comment.
Heads-up: this is the staging OAuth client only. Prod needs a per-site client map + a registered prod client — deliberately scoped out to FFL-2857. So this PR only works against datad0g.com today.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
2e87cbc to
7b347cd
Compare
4d4f152 to
415b54b
Compare
415b54b to
4a0a996
Compare
4a0a996 to
de6b4ea
Compare
de6b4ea to
9b5a9f3
Compare
| // chrome.storage.session (cleared when the browser session ends) — never persisted to disk. | ||
| // See FFL-2596 / the OAuth CLI client `13c94d15-067d-4263-a309-be4811141419` (staging). | ||
|
|
||
| const CLIENT_ID = '13c94d15-067d-4263-a309-be4811141419' |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| // chrome.storage.session (cleared when the browser session ends) — never persisted to disk. | ||
| // See FFL-2596 / the OAuth CLI client `13c94d15-067d-4263-a309-be4811141419` (staging). | ||
|
|
||
| const CLIENT_ID = '13c94d15-067d-4263-a309-be4811141419' |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
9b5a9f3 to
6d5a341
Compare
6d5a341 to
4596d8b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4596d8b078
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4596d8b to
a2d74a1
Compare
59a5aa6 to
dbf0fe9
Compare
dbf0fe9 to
cf550d4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf550d45d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BeltranBulbarellaDD
left a comment
There was a problem hiding this comment.
Overall it looks great. Just last set of comments and LGTM!
| } | ||
|
|
||
| export async function loadStoredTokens(): Promise<OAuthTokens | null> { | ||
| const result = await chrome.storage.session.get(TOKENS_STORAGE_KEY) |
There was a problem hiding this comment.
Edit:
Same thing as above.
| // loginWithOAuth actually generated (so the state check passes and we exercise the domain check). | ||
| function mockChromeIdentity(makeRedirect: (params: { state: string }) => string) { | ||
| const previousChrome = (globalThis as any).chrome | ||
| ;(globalThis as any).chrome = { |
There was a problem hiding this comment.
Agreed. @kellyw1806 would it be possible to use something like: https://github.com/DataDog/browser-sdk/blob/kelly.wang/ffl-2597/packages/browser-core/src/tools/mockable.ts#L25?
Adds the Flags tab (gated behind datadogMode) with an OAuth authorization_code + PKCE sign-in against Datadog's first-party OAuth server, the connect screen, and site handling. The selected site is validated against the js-core site allowlist before building any OAuth/API host, and the callback domain is checked against it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cf550d4 to
3414896
Compare
Motivation
Part of the Feature Flags devtools integration (FFL-2591), split into a small stacked series for focused review. This PR is the OAuth foundation: sign in to Datadog. Browsing the catalog (#4916) and overriding flags (#4912) build on top.
Stack (review bottom-up)
mainffl-2597ffl-2858Changes
authorization_code+ PKCE, public client) against Datadog's first-party OAuth server; tokens stored inchrome.storage.session(cleared on session end, never persisted).flagsSitesetting;identitymanifest permission.Demo
This is what all three stacked PRs look like working together:
Screen.Recording.2026-07-24.at.5.14.31.PM.mov
Checklist
oauth.spec.ts—getFlagsApiHost).