Changelog - 2026-11-06
An application id keeps two applications on one origin apart
New FeatureIn one line. Two ARDOR applications served from one origin used to share one session and one @app/store/ namespace. Give each an id in its application info and their keys are separate.
ts
const info = { name: 'Shop', version: '1.0.0', description: 'The shop', id: 'shop' };
// the session is now @app/auth/shop/token, @app/auth/shop/identity and @app/auth/shop/permission,
// the store prefix @app/store/shop/What changed
IApplicationInfo.id. Optional; letters, digits,.,_and-, not dots only. An invalid id stopsDefaultAuthServicefrom being built.LocalStorageKeys.scoped({ id })answers the keys of one application; without an id they are the existing constants.- One place.
DefaultAuthServicereads the id fromCoreBindings.APPLICATION_INFOand exposeskeys. ItscleanUp,DefaultAuthProvider's sign-out sweep of the store and the request service's default token all use it, so signing out of one application leaves the other's session and data alone. The keys stay under@app/auth/, whichBrowserStoragestill refuses to write. - A subclass of
DefaultAuthServicewith its own constructor passes the application info on (super(info));DefaultAuthProviderrefuses to start with a service that lost the id, so the session cannot silently stay shared. - An old session is left where it was. Keys under a previous scope (the unscoped ones, or another id) are not read, moved or removed, so an old token stays on disk until it is removed by hand or by an application that sweeps that scope.
DefaultNetworkRequestService.readAuthTokenFromStorageis for applications with no id. An application with an id hands its data sourcegetDataSourceAuth()of the data provider instead.- Added
DefaultNetworkRequestService.createAuthTokenReader: Returns a token reader for an application by its ID soHttpDataSourceinstances can resolve the matching sign-in token from storage. Omitting the ID preserves the default application token lookup, while an invalid ID throws immediately on creation. - No id, no change. An application without an
idkeeps the keys it has, so there is nothing to migrate. An application with anidstarts with an empty session under the new keys: its users sign in once.
Who is affected
- Applications that share an origin. Give each an
id. One without an id still sweeps all of@app/auth/and@app/store/at sign-out, the others' keys included. - All other applications. No action needed.