@clerk/shared
4.45.1 · 14 Nov 2026MIT11.8M / weekRepositorynpmAtom feed
Upgrading @clerk/shared From 2.22.1 to 4.44.0
192 releases in betweennotes for 191
- 32+
- changes to make
- 0
- advisories fixed
- 182+
- new
- 175+
- fixes
Counted from 191 of 192 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking4.16.0
- Breaking4.16.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
Security
- 4.25.5
Escape
<,>, and/when serializing the Clerk auth state into SSR<script>tags, preventing a</script>sequence inside user-controllable session claims from breaking out of the script element (stored XSS). The embedded JSON still parses to identical values on the client. - 4.13.1
Bump
js-cookieto3.0.7to address GHSA-qjx8-664m-686j. - 3.43.1
Fix prototype pollution vulnerability in
fastDeepMergeAndReplaceandfastDeepMergeAndKeeputilities by blocking dangerous keys (__proto__,constructor,prototype) during object merging.
Release by release
- New
Add the experimental
NativeAppSettingsJSON,IOSMinimumVersionJSONandAndroidMinimumVersionJSONtypes for the minimum app versions in the environment'snative_app_settings. These may change in minor releases. - Fixed
Fixes signing out of all accounts on satellite domains to preserve device recognition when Device Trust and client persistence are enabled. Preserves existing navigation callbacks when cross-domain repair is unavailable, and skips the repair redirect when Device Trust or client persistence is disabled. Malformed redirect URLs no longer prevent the sign-out request.
- New
- Fixed
Wait up to 10 seconds, instead of 5, for the Device Intelligence check to finish before sending a sign-in or sign-up without its result. This applies when an instance hasn't configured its own limit. Users on slow connections are less likely to have sign-ups blocked by protections that require a Device Intelligence result.
- Fixed
- New
Add the optional
slackTeamIdHintworkspace hint to Slack sign-in and sign-up attempts, including redirect, popup, and unified SSO flows.
- New
- New
Add
selfServeDirectorySyncEnabledtoOrganizationResource. Self-serve Directory Sync is now enabled per organization by this setting instead of followingselfServeSSOEnabled. In<OrganizationProfile />, the Security page now appears for organizations that have only Directory Sync enabled, and their admins can manage the connection's directory. Organizations that have self-serve SSO without Directory Sync no longer see the Directory Sync section. - Fixed
Session
expireAtandabandonAtno longer special-case a0deadline; the backend now always sends a real deadline.
- New
- New
Add internal query helpers used by
@clerk/mosaic. - Fixed
Keep a session's
expireAtandabandonAtat Unix epoch zero when the session has no maximum lifetime, instead of falling back to the current time.
- New
- New
Support passkeys as a second factor during sign-in and session reverification.
- New
- New
Add a role mapping step to the self-serve Directory Sync setup in
<OrganizationProfile />. Organization admins can now assign an organization role to each directory group their identity provider pushes, set which group wins when a member belongs to several, and turn role syncing on or off. Members in no mapped group keep the organization's default role. The step is read-only for members without theorg:sys_memberships:managepermission and while the organization's role set is being migrated. - New
Add an
enterpriseConnectionsUrloption tohandleRedirectCallback()and<AuthenticateWithRedirectCallback />. When the Clerk API asks an OAuth sign-up to choose between several enterprise connections for the same email domain, the callback navigates to this URL, which defaults to theenterprise-connectionsroute of your sign-up page.
- New
- Fixed
The missing and invalid key errors now say that
npx clerk@latest initdoes not need a Clerk account and writes temporary dev keys. Readers previously sawinitlisted besidelink,env pulland the Dashboard link, and assumed signing up was required before any of the steps would work.
- Fixed
10 other lines we could not sort, mostly version bumps
- 4.0.0
Renamed all
__unstable_*methods to__internal_*(for internal APIs) - 4.0.0
Renamed all
experimental__*andexperimental_*methods to__experimental_*(for beta features) - 4.0.0
Refactor React SDK hooks to subscribe to auth state via
useSyncExternalStore. This is a mostly internal refactor to unlock future improvements, but includes a few breaking changes and fixes. - 4.0.0
Updating minimum version of Node to v20.9.0
- 4.0.0
Adjust features parsing to throw errors on unknown scopes.
- 4.0.0
Remove
clerkJSUrl,clerkJSVersion,clerkUIUrl, andclerkUIVersionprops from all SDKs. To pin a specific version of@clerk/clerk-js, import theClerkconstructor from@clerk/clerk-jsand pass it toClerkProvidervia theClerkprop. To pin a specific version of@clerk/ui, importuifrom@clerk/uiand pass it via theuiprop. This bundles the modules directly with your application instead of loading them from the CDN. - 4.0.0
Removes now unused contexts
ClientContext,SessionContext,UserContextandOrganizationProvider. We do not anticipate public use of these. If you were using any of these, file an issue to discuss a path forward as they are no longer available even internally. - 4.0.0
getToken()now throwsClerkOfflineErrorinstead of returningnullwhen the client is offline. - 4.0.0
Update
ClerkAPIError.kindvalue to match class name - 4.0.0
Removing deprecated top-level exports from @clerk/shared
75 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.