Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
b95aba5
feat: add DPoP core storage layer (ENG-4782)
mrudatsprint Jul 15, 2026
9f3e0bc
feat: fix file formatting.
mrudatsprint Jul 15, 2026
7738bb4
fix: DPoPStorage openDb() error handling and test coverage
mrudatsprint Jul 15, 2026
d386a32
fix: fix copilot warnings.
mrudatsprint Jul 15, 2026
bd37ddf
fix: resolve DPoP transactions on tx.oncomplete, not req.onsuccess
mrudatsprint Jul 16, 2026
d91e5b7
feat: the workflow will run regardless of the branch being merged into.
mrudatsprint Jul 16, 2026
7eeb367
feat: implement DPoPManager central coordinator (ENG-4784)
mrudatsprint Jul 16, 2026
06a557e
feat: re-generate lock file.
mrudatsprint Jul 16, 2026
00a0acb
feat: re-generate lock file.
mrudatsprint Jul 16, 2026
14b9b4a
feat: update lock file.
mrudatsprint Jul 16, 2026
e9a8048
Merge branches 'miker/eng-4784/central-coordinator' and 'miker/eng-47…
mrudatsprint Jul 16, 2026
ec6372e
test: add DPoP smoke tests against real FusionAuth instance (pre-SDKC…
mrudatsprint Jul 16, 2026
324d970
feat: fix format and lint errors.
mrudatsprint Jul 17, 2026
952cd03
refactor: make DPoPStorage IndexedDB constants configurable via confi…
mrudatsprint Jul 17, 2026
b7e6feb
feature: delete contrived test to intercept a successful even and the…
mrudatsprint Jul 17, 2026
2c27865
Merge branch 'miker/eng-4782/core-storage-layer' into miker/eng-4784/…
mrudatsprint Jul 17, 2026
b5601e2
fix: update DPoPStorage constructor calls to use config object after …
mrudatsprint Jul 17, 2026
252322a
feature: update lock file
mrudatsprint Jul 17, 2026
eb01796
feat: implement SDKCore.startLogin() for DPoP authorization code gran…
mrudatsprint Jul 18, 2026
ce41545
fix: add @vitest-environment jsdom to SDKCore.test.ts; fix handlePreR…
mrudatsprint Jul 18, 2026
f29df57
fix: suppress cookie console.error noise in Tier 0 e2e tests
mrudatsprint Jul 18, 2026
7babfae
feat: update lock file.
mrudatsprint Jul 18, 2026
bfc666a
fix: update Angular onRedirect test to use 3-segment redirect-value f…
mrudatsprint Jul 18, 2026
27b9ab6
fix: update Vue and React onRedirect tests to use 3-segment redirect-…
mrudatsprint Jul 18, 2026
14c1d0c
fix: merge Request and init headers in DPoPManager.fetch() instead of…
mrudatsprint Jul 20, 2026
b1567a6
feat: fix angular and vue tests.
mrudatsprint Jul 20, 2026
f7cefc8
fix: clone Request before retry in fetch() to avoid double body consu…
mrudatsprint Jul 20, 2026
ddb5509
fix: normalize htu and htm in generateProof() per RFC 9449 (PR #202 C…
mrudatsprint Jul 20, 2026
185357c
fix: remove dead captured header variables and misleading comment in …
mrudatsprint Jul 20, 2026
f5b1143
feat: add DPoP core storage layer (ENG-4782) (#201)
mrudatsprint Jul 20, 2026
098bbfb
feat: update approvers.
mrudatsprint Jul 20, 2026
13db934
feat: fix merge conflict.
mrudatsprint Jul 20, 2026
2b6e6de
feat: fix failing tests.
mrudatsprint Jul 20, 2026
920081d
test: add deterministic nonce-retry smoke test (T2-4)
mrudatsprint Jul 20, 2026
b711f2d
fix: revert startLogin() to void, address Copilot PR review comment (…
mrudatsprint Jul 20, 2026
8cfc607
docs: fix stale/ambiguous state-reconstruction description in Redirec…
mrudatsprint Jul 20, 2026
a03dd2e
fix: preserve state from legacy 2-segment redirect values (Copilot PR…
mrudatsprint Jul 21, 2026
50b852f
feat: update comments.
mrudatsprint Jul 21, 2026
8f8f5bc
feat: SDKCore: implement handlePostRedirect() authorization code exch…
mrudatsprint Jul 21, 2026
d5f4569
feat: remove references to ENG- linear issues.
mrudatsprint Jul 21, 2026
5f517f0
feat: remove redundant comments.
mrudatsprint Jul 21, 2026
1f4de60
feat: merge and remove verbose comments.
mrudatsprint Jul 22, 2026
2ef92aa
feat: Implement DPoPManager - central coordinator (ENG-4784) (#202)
mrudatsprint Jul 22, 2026
aa7bbdc
feat: merge in the parent branch.
mrudatsprint Jul 22, 2026
9acf888
feat: remove file not needed until adding end to end tests.
mrudatsprint Jul 22, 2026
24b7337
feat: remove lengthy comment.
mrudatsprint Jul 22, 2026
e5342e3
feat: remote unnecessary comments.
mrudatsprint Jul 22, 2026
ac12953
feat: merge in the parent branch.
mrudatsprint Jul 22, 2026
81f46f4
feat: remove verbose comment.
mrudatsprint Jul 22, 2026
ab79bf8
feat: copilot review warnings.
mrudatsprint Jul 22, 2026
fd4353e
feat: failing smoke test.
mrudatsprint Jul 22, 2026
d138ca3
feat: minimize verbose comments.
mrudatsprint Jul 22, 2026
0232d82
feat: clean up comments.
mrudatsprint Jul 22, 2026
1a58211
feat: minimize verbose comments.
mrudatsprint Jul 22, 2026
44cd888
feat: SDKCore - implement startLogout() and getAccessToken() for DPoP…
mrudatsprint Jul 23, 2026
595c4e4
feat: rebuild the lock file.
mrudatsprint Jul 23, 2026
ff619a3
feat: remove verbose comments.
mrudatsprint Jul 23, 2026
16859d9
feat: remove verbose comments.
mrudatsprint Jul 23, 2026
711c709
feat: SDKCore - implement refreshToken() for DPoP mode (ENG-4801)
mrudatsprint Jul 24, 2026
e3e174a
feat: refresh token grant
mrudatsprint Jul 24, 2026
78cf20d
feat: remove verbose comments.
mrudatsprint Jul 24, 2026
5bef47a
chore: upgrade vitest to v3.2.6 for core, lexicon, and sdk-react
mrudatsprint Jul 24, 2026
20d66a8
feat: add DPoP to the React SDK, sync the version of vitest being use…
mrudatsprint Jul 24, 2026
1da8ebe
feat: The Authorization Code Grant can be started (#203)
mrudatsprint Jul 24, 2026
4d8985d
Merge branch 'parent/dpop-in-the-javascript-sdk' into miker/eng-4800/…
mrudatsprint Jul 26, 2026
4a990cf
feat: copilot recommendation .
mrudatsprint Jul 27, 2026
c5e1f35
feat: cleanup comments.
mrudatsprint Jul 27, 2026
31cb1ad
feat: reduce commenting.
mrudatsprint Jul 27, 2026
46984e9
Merge branch 'miker/eng-4800/code-grant-finish' into miker/eng-4802/s…
mrudatsprint Jul 27, 2026
7861863
feat: insure logout url is called.
mrudatsprint Jul 27, 2026
ed1f063
feat: use hosted backend mode versus cookie mode in comments.
mrudatsprint Jul 27, 2026
e716fee
feat: remove verbose comments.
mrudatsprint Jul 27, 2026
9792d12
feat: In the Authorization Code Grant flow, exchange the code for tok…
mrudatsprint Jul 28, 2026
fe643bf
Merge branch 'parent/dpop-in-the-javascript-sdk' into miker/eng-4802/…
mrudatsprint Jul 28, 2026
6455306
Merge branch 'miker/eng-4802/start-logout' into miker/eng-4801/refres…
mrudatsprint Jul 28, 2026
210dbf8
feat: update from the last merge.
mrudatsprint Jul 28, 2026
617826e
feat: remove comment verbosity.
mrudatsprint Jul 28, 2026
f8c2e59
feat: remove comment verbosity.
mrudatsprint Jul 28, 2026
4298efe
Merge branch 'miker/eng-4801/refresh-token' into mike/eng-4787/dpop-sdks
mrudatsprint Jul 28, 2026
a19cf50
feat: reduce verbose commenting.
mrudatsprint Jul 28, 2026
6797302
fix: address Copilot review comments on refreshDpopToken() (PR #206)
mrudatsprint Jul 28, 2026
f90d545
feat: preserve the existing refresh token, if needed.
mrudatsprint Jul 28, 2026
3960681
fix: reapply refreshDpopToken() Copilot fixes lost in the eng-4801 merge
mrudatsprint Jul 28, 2026
b5e1de4
fix: DPoP mode startLogout() targets /oauth2/logout directly
mrudatsprint Jul 28, 2026
d14345a
test: add DPoP endpoint e2e tests (dpop-endpoints.test.ts)
mrudatsprint Jul 28, 2026
c8ada31
feat: SDKCore.fetchUserInfo() is DPoP aware (ENG-4931)
mrudatsprint Jul 29, 2026
12d466c
feat: cleanup
mrudatsprint Jul 29, 2026
e0cca73
feat: test user info endpoint.
mrudatsprint Jul 29, 2026
4b3a38d
fix: React SDK auto-fetches userInfo after async DPoP login, not just…
mrudatsprint Jul 29, 2026
d4263c7
test: merge userinfo check into the auto-refresh test
mrudatsprint Jul 29, 2026
02ed28a
debug: temporary diagnostics for the /oauth2/userinfo investigation
mrudatsprint Jul 29, 2026
f9c6ffe
Revert "debug: temporary diagnostics for the /oauth2/userinfo investi…
mrudatsprint Jul 29, 2026
0d90540
docs: document the FusionAuth CORS prerequisite for /oauth2/userinfo
mrudatsprint Jul 29, 2026
0258a16
feat: remove verbose comments.
mrudatsprint Jul 29, 2026
3bacdd6
feat: The OIDC logout flow is supported (#205)
mrudatsprint Jul 29, 2026
af93031
fix: prevent duplicate DPoP authorization code exchange on concurrent…
mrudatsprint Jul 29, 2026
cef6017
feat: cleanup duplicate code grant exchanges being tracket.
mrudatsprint Jul 29, 2026
bea8a4b
Merge branch 'parent/dpop-in-the-javascript-sdk' into miker/eng-4801/…
mrudatsprint Jul 29, 2026
37c3c35
fix: dpop-smoke.test.ts refresh token test — undefined var + wrong order
mrudatsprint Jul 29, 2026
3417fc2
feat: parent merge
mrudatsprint Jul 29, 2026
2924951
feat: The Angular Framework has is using the DPoP functionality in th…
mrudatsprint Jul 30, 2026
86b6458
feat: The Refresh Token Grant flow is supported (#206)
mrudatsprint Jul 30, 2026
0b98e9c
feat: The Vue Framework using DPoP.
mrudatsprint Jul 30, 2026
52188c8
feat: the VUE framework using DPoP.
mrudatsprint Jul 30, 2026
1cce4e5
feat: remove verbose comments.
mrudatsprint Jul 31, 2026
9c97883
feat: remove verbose comments.
mrudatsprint Aug 1, 2026
f0ca26c
feat: remove test duplication.
mrudatsprint Aug 1, 2026
89f588d
test: add dpopFetch resource-access and nonce-retry e2e coverage (ENG…
mrudatsprint Aug 1, 2026
4893e00
fix: expose WWW-Authenticate/DPoP-Nonce headers on mocked cross-origi…
mrudatsprint Aug 2, 2026
0aa919d
feat: remove verbose comments.
mrudatsprint Aug 2, 2026
dba3da8
feat: remove verbose comments.
mrudatsprint Aug 2, 2026
06425d8
fix: address Copilot review comments on PR #208
mrudatsprint Aug 2, 2026
744627d
feat: remove verbose comments.
mrudatsprint Aug 2, 2026
26c41f1
fix: build @fusionauth-sdk/core before running dpop-endpoints e2e suite
mrudatsprint Aug 2, 2026
af86a09
feat: remove verbose comments.
mrudatsprint Aug 2, 2026
b395b86
feat: Framework SDKs support DPoP (#207)
mrudatsprint Aug 3, 2026
7e2924f
Merge branch 'parent/dpop-in-the-javascript-sdk' into miker/eng-4790
mrudatsprint Aug 3, 2026
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a managed file. Manual changes will be overwritten.
# https://github.com/FusionAuth/fusionauth-public-repos/

.github/ @fusionauth/owners @fusionauth/platform
.github/ @fusionauth/owners @fusionauth/platform @fusionauth/sdk-owners
1 change: 0 additions & 1 deletion .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Lint and Format

on:
pull_request:
branches: [main]

jobs:
check:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Run Tests

on:
pull_request:
branches: [main]

jobs:
test:
Expand Down
64 changes: 64 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# AGENTS.md — fusionauth-javascript-sdk

## Repo Layout

Yarn workspace monorepo:

- `packages/core` — `@fusionauth-sdk/core`, shared logic for React/Angular/Vue SDKs
- `packages/lexicon` — `@fusionauth-sdk/lexicon`, shared utility types (Path, GUID, etc.)
- `packages/sdk-react` — `@fusionauth/react-sdk`
- `packages/sdk-angular` — Angular SDK (`sdk-angular-workspace`)
- `packages/sdk-vue` — `@fusionauth/vue-sdk`

## Package Manager

- **Yarn 1.22.x** via Corepack, not npm. `yarn` may not be on `PATH` directly —
use `corepack yarn <cmd>` if plain `yarn` isn't found.
- Root scripts: `yarn build:core`, `yarn build:sdk-react`, etc. Per-workspace:
`yarn workspace @fusionauth-sdk/core test`.

## Node Version Constraint

- **Angular SDK requires Node ^22.22.3 / ^24.15.0 / >=26.0.0.** If the active
Node is v20.x, `yarn workspace sdk-angular-workspace test` (and the root
`yarn test` which runs it) will fail with an engine/CLI version error.
This is an environment limitation, not a code issue — don't try to "fix" it
by changing the Angular config.
- If `yarn install` complains about the Angular engine mismatch, use
`yarn install --ignore-engines`.

## Testing

- Vitest, `environment: 'jsdom'` (see each package's `vite.config.ts`).
- `packages/core` tests needing `indexedDB` must polyfill it with
`fake-indexeddb`'s `IDBFactory` (jsdom has no native IndexedDB).
- Husky's `.husky/pre-commit` hook runs `yarn test` across **all** workspaces
plus `lint-staged`. In environments without Node 22+, this hook will fail
on the Angular workspace even when your actual changes are fine — verify
the specific package's tests pass, note that the Angular failure is
environmental, and use `git commit --no-verify` if needed (call this out
explicitly to the user rather than silently bypassing).

## Lint / Format

- ESLint config: root `.eslintrc.json` (`@typescript-eslint`, warns on unused
vars, `prefer-const`).
- Prettier: root `.prettierrc` (single quotes, semi, trailing commas, 80 print
width). Run `npx prettier --check <paths>` / `--write` before committing.

## Code Conventions

- Each module lives in its own folder with `X.ts`, `X.test.ts`, and an
`index.ts` barrel export (see `UrlHelper/`, `CookieHelpers/`, `DPoP/`).
- Constructors that take more than one argument use a config object (e.g.
`DPoPStorageConfig`, `UrlHelperConfig`) rather than positional parameters.
- Browser-only APIs (`localStorage`, `indexedDB`, etc.) should degrade
gracefully for non-browser/SSR consumers — see `RedirectHelper.ts`'s
try/catch fallback pattern.
- Doc comments (`/** ... */`) on all public `SDKConfig` fields and public
class methods, matching existing style.
- **IndexedDB `dbVersion`**: IndexedDB versions can only increase. Never pass
a `dbVersion` lower than one already persisted in a browser — doing so
produces a `VersionError` and the database will not open. Only increment
`dbVersion` when a structural schema change (e.g. new object store) is also
being made inside `onupgradeneeded`.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ The e2e tests are structured to use the Page Object Model (POM) design pattern.
Example: In common.page.ts, methods for navigation and authentication are defined.
Tests import these page objects to perform actions, ensuring that if the UI changes, only the page object needs updating, not all the tests.

### DPoP E2E tests

`e2e/tests/dpop-endpoints.test.ts` — mirrors `endpoints.test.ts`, but drives a consuming quickstart application configured with `useDpop: true` through its UI. Since DPoP mode has no hosted backend mode (`SDKCore` talks directly to FusionAuth), this validates the *direct* calls to `/oauth2/authorize`, `/oauth2/token` (both the authorization code exchange and the refresh token grant), `/oauth2/userinfo`, and `/oauth2/logout`:
```
SERVER_COMMAND="your-dpop-quickstart-start-command" PORT=your-port-number npx playwright test e2e/tests/dpop-endpoints.test.ts --config playwright.dpop-endpoints.config.ts
```
This must be run on its own — it cannot be combined with `endpoints.test.ts` / `cookies.test.ts` in the same invocation, since those require a hosted backend mode quickstart instance instead.

## Architecture

We use a monorepo because our SDKs share core functionality, which is contained in the @fusionauth-sdk/core package. This private module is bundled into the distributed SDK packages, allowing us to maintain core logic in a single place.
Expand Down
13 changes: 10 additions & 3 deletions e2e/pages/common.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ export class quickstartPage {
await this.locators.passwordInput.clear();
await this.locators.passwordInput.fill('password');
await this.locators.submitBtn.click();
// Wait for the full OAuth callback chain to complete (form POST → /app/callback
// code exchange → redirect back to the app). Without this, webkit doesn't finish
// committing the session cookies before the test body reads them.
await expect(this.locators.logOutBtn).toBeVisible();
await this.page.waitForLoadState('load');
}

async navToRegister() {
Expand All @@ -52,7 +50,16 @@ export class quickstartPage {
}

async logOut() {
const logoutNavigationPromise = this.page.waitForURL(
url => /\/(oauth2|app)\/logout/.test(url.pathname),
{ timeout: 10_000 },
);

await this.locators.logOutBtn.click();
await logoutNavigationPromise;

await expect(this.locators.logInBtn.nth(0)).toBeVisible();
// See the comment in authenticate() above.
await this.page.waitForLoadState('load');
}
}
Loading
Loading