Skip to content

[pull] main from AxaFrance:main#1

Open
pull[bot] wants to merge 490 commits into
Thodor12:mainfrom
AxaFrance:main
Open

[pull] main from AxaFrance:main#1
pull[bot] wants to merge 490 commits into
Thodor12:mainfrom
AxaFrance:main

Conversation

@pull

@pull pull Bot commented Jul 2, 2024

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

GitHub and others added 30 commits March 13, 2024 11:25
* feat(dpop): add extras (alpha)

* udpate readme
* feat(oidc): control dpop injection

* fix (alpha)
* feature(oidc):preload user (alpha)

* fix (alpha)

* fix (alpha)
GitHub and others added 30 commits February 21, 2026 20:00
…) (release)

* Initial plan

* Fix service worker version mismatch infinite loop

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
…g the auth flow state separately to tokens (#1646) (release)

* Add a 'login_state_storage' option to allow storing the auth flow state in a separate storage location to tokens

* Fix linting/prettier errors
…t indefinite fetch blocking (#1654) (release)

* Initial plan

* fix: add timeout to service worker token renewal wait loop to prevent indefinite blocking

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/105842f5-c410-4bf7-8a9e-29e8abd14605

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* Update packages/oidc-client-service-worker/src/OidcServiceWorker.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: introduce pollIntervalMs constant to eliminate duplicated magic number in token wait loop

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/9373b4b4-0dda-423c-a5bd-4bba8b6874f2

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* refactor: extract waitForValidTokens helper, add unit tests, clean French comments

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/3a4db321-6447-46a7-9d3a-fd492ce7c4a2

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* fix: resolve prettier lint errors in OidcServiceWorker.ts and waitForValidTokens.spec.ts

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/aef4dfe7-3b7e-462b-aee8-3dd7432c9e20

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
Co-authored-by: Guillaume Chervet <guillaume.chervet@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…alls (#1655) (release)

* Initial plan

* fix: cache navigator.serviceWorker.register to prevent infinite calls per session

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/39857db9-4f77-4326-bf37-c5840cfccf59

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/bb2a602c-26d1-484d-9297-e7f88ec0d87a

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
#1657)

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/ae74946f-abdc-4fd8-85b3-f7bcea07d00f

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/cfced9d8-6d28-4ce4-9969-e891320d9995

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
* Update workspace dependencies

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/a16aa964-48d7-42e3-bfac-9bc6e1529354

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* Fix demo website CI Node version

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/6bb881d1-127d-43b2-803b-3d670bed2007

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
* Initial plan

* Bypass non OIDC service worker requests

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/c3807b47-b316-4658-928d-53c56b639eba

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* Refine non OIDC bypass helper

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/c3807b47-b316-4658-928d-53c56b639eba

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

* Keep access token domains intercepted

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/c87015bc-b866-4c0f-9042-c87efba325fc

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
* Initial plan

* Update all libraries to latest versions

Agent-Logs-Url: https://github.com/AxaFrance/oidc-client/sessions/72020054-7ed1-4849-94c9-5d9f05e003b0

Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: guillaume-chervet <52236059+guillaume-chervet@users.noreply.github.com>
) (release)

Bracket-notation assignment to `Storage` coerces `undefined`/`null` to the
literal strings `"undefined"`/`"null"`, which then poison the next
`JSON.parse` read and throw `SyntaxError: "undefined" is not valid JSON`.

This is the same bug reported in #871, #1257, #1274. PR #1258 added a
falsy-string guard to `getLoginParams`, but `"undefined"` is a truthy
string so the guard misses the poisoning case, and the setter side was
never addressed.

This change:

- Guards every setter in `initSession.ts` (and the SW fallback path in
  `initWorker.ts`) so `undefined`/`null` deletes the key instead of
  writing a poisoned string.
- Adds a `parseJsonOrNull` helper used by all readers, providing
  defence-in-depth against pre-existing poisoned values written by
  older versions of the library.
- Adds regression tests covering poisoning via both new writes and
  pre-existing poisoned storage entries.

Affected setters: `setLoginParams`, `setTokens`, `setNonceAsync`,
`setStateAsync`, `setCodeVerifierAsync`, `setSessionStateAsync`,
`setDemonstratingProofOfPossession{Jwk,Nonce}`.

Affected readers (defensive parse): `initAsync`, `getTokens`,
`getLoginParams`, `getDemonstratingProofOfPossessionJwkAsync`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.