@axa-fr/oidc-client 7.30.2 → 7.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.js +337 -330
- package/dist/index.umd.cjs +2 -2
- package/dist/initWorker.d.ts.map +1 -1
- package/dist/initWorkerUpdates.spec.d.ts +2 -0
- package/dist/initWorkerUpdates.spec.d.ts.map +1 -0
- package/dist/keepSession.d.ts.map +1 -1
- package/dist/node_modules/@axa-fr/oidc-client-service-worker/dist/OidcServiceWorker.js +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/initWorker.ts +27 -11
- package/src/initWorkerUpdates.spec.ts +136 -0
- package/src/keepSession.spec.ts +98 -0
- package/src/keepSession.ts +24 -2
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -113,6 +113,16 @@ worker or configured browser storage when saved login parameters are missing or
|
|
|
113
113
|
cannot be parsed. Renewal then starts without saved extras or scope overrides.
|
|
114
114
|
This does not recover missing tokens or bypass login callback state/nonce checks.
|
|
115
115
|
|
|
116
|
+
Restoration checks token expiry before reporting success. When the restored
|
|
117
|
+
tokens are expired, it awaits renewal using the available refresh token or
|
|
118
|
+
configured silent sign-in flow, including in fetch-triggered renewal mode. It
|
|
119
|
+
starts the renewal timer, session monitoring and optional user-info preload only
|
|
120
|
+
after renewal succeeds. Unexpired tokens do not trigger an initial renewal.
|
|
121
|
+
If renewal returns no valid tokens, restoration returns `false` with cleared page
|
|
122
|
+
tokens. A refresh token or usable silent sign-in flow is still required.
|
|
123
|
+
Await the restoration promise before reading `tokens` or starting authenticated
|
|
124
|
+
work; the internal token snapshot is used while renewal is pending.
|
|
125
|
+
|
|
116
126
|
If restoration fails, the client clears page tokens and cached user information,
|
|
117
127
|
cancels its renewal timer, and stops session monitoring before awaiting worker
|
|
118
128
|
cleanup. A subsequent call can retry restoration. Worker cleanup failures still
|
|
@@ -340,6 +350,13 @@ service_worker_only: true,
|
|
|
340
350
|
|
|
341
351
|
Serve the worker from a URL whose scope covers your application, using HTTPS (or localhost for development). With `service_worker_only: true`, login requires an available service worker. With `false` (the default), the client can fall back to browser storage when worker mode is unavailable. Choose that fallback deliberately.
|
|
342
352
|
|
|
353
|
+
Worker initialization explicitly checks for script updates once on cold start,
|
|
354
|
+
then at most once per hour per registration within the page, even if a check
|
|
355
|
+
fails. Concurrent and repeated synchronization calls share that limit. New
|
|
356
|
+
registrations and version-mismatch recovery can check immediately. Browser
|
|
357
|
+
initiated checks are independent. Update listeners remain active between checks,
|
|
358
|
+
and controller claiming and worker activation still run during initialization.
|
|
359
|
+
|
|
343
360
|
### Trusted-domain options
|
|
344
361
|
|
|
345
362
|
These options belong in each named entry in `OidcTrustedDomains.js`, not in `OidcConfiguration`.
|