All notable changes to this project will be documented in this file.
If you have any questions, see the issues and discussions (e.g. #18)
- Exposed the
SessionIDB, an IndexedDB-based implementation of theSessionDatabaseinterface, such that it can be used out-of-the-box in aSessionCore, the Session implementation of thecorelibrary version.
- Removed requirement for
id_token_signed_response_alg: ES256in dynamic client registration, which resulted in being unable to authenticate with servers that do not support that algorithm, e.g. NSS (related to #14).
-
Event-Driven Session Management: The Session class now extends the standard EventTarget, allowing for modern, flexible event handling (e.g., addEventListener).
-
Introduces three new session lifecycle events via the SessionEvents enum:
-
STATE_CHANGE: Fires on login, logout, or token refresh. Event detail includes
{ isActive: boolean, webId?: string }. -
EXPIRATION_WARNING: Fires when automatic token refresh fails, but the session is not yet expired. Event detail includes
{ expires_in: number }. -
EXPIRATION: Fires when the session has definitively expired.
-
- For backward compatibility, the original
onSessionStateChange,onSessionExpirationWarning, andonSessionExpirationcallbacks in SessionOptions are now powered by the new EventTarget system.
(Changes based on Pull Request #20, addresses #19)
- Side-effect-free imports: Server-side rendering does not longer trigger execution of web worker code. (Fixes #21).
-
Major internal refactor to decouple core session logic from browser-specific implementations (like IndexedDB).
-
The default Session (for web) now uses a SharedWorker to manage token refreshing in the background.
-
Session state changes (login, logout, token updates) are now automatically synchronized across all open browser tabs.
- Reliable Token Refresh: The new SharedWorker architecture ensures that tokens are reliably refreshed even when tabs are inactive or hibernating, resolving issues where sessions would become stale. (Fixes #13).
- A new core entry point (
@uvdsl/solid-oidc-client-browser/core) is now available for advanced use cases requiring custom session storage or refresh lifecycle management (e.g., in browser extensions).
-
Framework Reactivity: While this version introduces no breaking API changes, the move to a SharedWorker for token refreshing (to fix cross-tab and hibernation issues) may affect reactivity in frameworks like Vue or React. Because the worker runs in a separate thread, changes to the session object (like token refreshes) may not be automatically detected by your framework's reactivity system. To fix this, please use the
onSessionStateChangecallback in SessionOptions to manually update your application's state. See the Vue Usage Example for a recommended pattern. Please also note that a corresponding issue has already been raised (#19). -
CDN support: Loading a web worker via CDN is not allowed. Currently, the best option for CDN is to keep using version
0.1.3.
(Changes based on Pull Request #17)
- DPoP ath Mismatch: Fixed a critical bug where the access token hash (ath) was not being recalculated after a token refresh. This caused all subsequent authenticated requests to fail with a 401 Unauthorized error. (Fixes #16)
- Relaxes validation for Identity Provider (IdP) URL input to better handle variations. (Fixes #15, also related to #10)
- Resolves an issue related to session restoration logic. (Fixes #11)
-
Separation of Concerns: Extracted session restoration logic from
handleRedirectFromLogininto its ownsession.restore()method. This makes the login flow clearer and gives developers explicit control over when to restore a session. -
Refactored ClientDetails and internal file naming for clarity.
- Adds the
ath(Access Token Hash) claim to DPoP tokens, enhancing security.
- Introduced initial token refresh capabilities and session deactivation logic.
-
Enhanced client information handling.
-
Added support for client details during dynamic registration.
-
Added support for using a dereferenceable
client_id(Client ID URL) as an alternative to dynamic registration.
-
Uses IndexedDB to store the non-extractable DPoP KeyPair, which is now correctly remembered for use in the RefreshTokenGrant.
-
Sets
token_endpoint_auth_methodtononefor public clients during RefreshTokenGrant, as required by the spec. (Addresses #6 via Pull Request #9)
-
Token Rotation: Ensured that the new
refresh_tokenis correctly saved after a successful token refresh. (Pull Request #5) -
Hotfix: Corrects the handling of the Identity Provider (IdP) URL during OIDC configuration discovery and
iss(issuer) validation. (Fixes #8)
-
Removed superfluous n3 dependency.
-
Removed axios dependency (see 0.0.6).
- Replaced axios dependency with the browser's native
window.fetch, reducing bundle size.
- Added validation for
id_tokenandaccess_tokenclaims (e.g.,iss,aud, DPoPjkt). (Fixes #2)
- Fixed incorrect error logging for the state check (CSRF protection) during the authorization code flow. (Fixes #1)
-
Updated publishing setup to use Rollup for bundling and tree-shaking.
-
Removed CJS (CommonJS) output in favor of ESM (ES Modules).
- Initial commit and first functional release.