Open
Conversation
1fe7d3d to
bc9155d
Compare
bc9155d to
bc42437
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^6.39.0→^7.0.4Release Notes
clerk/javascript (@clerk/nextjs)
v7.0.4Compare Source
Patch Changes
1f43bf7,766ae5b,de1386f,02ff4f2]:v7.0.2Compare Source
Patch Changes
Fix build failures when using
cacheComponents: truewith dynamic routes (e.g.[id]) (#7989) by @jacekradkoUpdated dependencies [
a8c64cc,776ee1b,7fb870d,398b7f9,09cb6d4,09088ed]:v7.0.1Compare Source
Patch Changes
Update README prerequisites to match actual
package.jsonengine and peer dependency constraints. (#7972) by @jacekradkoUpdated dependencies [
55ece85]:v7.0.0Compare Source
Major Changes
Align experimental/unstable prefixes to use consistent naming: (#7361) by @brkalow
__unstable_*methods to__internal_*(for internal APIs)experimental__*andexperimental_*methods to__experimental_*(for beta features)__unstable_manageBillingUrl,__unstable_manageBillingLabel,__unstable_manageBillingMembersLimit) andexperimental__forceOauthFirstRenamed
__unstable_invokeMiddlewareOnAuthStateChangeto__internal_invokeMiddlewareOnAuthStateChange. (#7925) by @jacekradkouseAuth().getTokenis no longerundefinedduring server-side rendering, it is a function and calling it will throw. (#7730) by @EphemgetTokeninuseEffect, event handlers or with non-suspenseful data fetching libraries, no change is necessary as these only trigger on the client.getTokenalready, since this has never been possible.getToken === undefinedchecks to avoid calling it, know that it will now throw instead and you should catch and handle the error.To access auth data server-side, see the
Authobject reference doc.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. (#7411) by @EphemBreaking changes:
initialAuthStatetouseAuthinitialStateto the<ClerkProvider>, ordynamicif using the Next packageFixes:
useAuthwould sometimes briefly return theinitialStaterather thanundefineduser: nullon the first page after signing in, indicating a signed out stateclerk-jshad loaded fullyUpdating minimum version of Node to v20.9.0 (#6936) by @jacekradko
Throw an error when an encryption key is missing when passing a secret key at runtime
clerkMiddleware(). To migrate, ensure your application specifies aCLERK_ENCRYPTION_KEYenvironment variable when passingsecretKeyas a runtime option. (#7360) by @brkalowReturn 401 instead of 404 for unauthenticated server action requests in
auth.protect()(#7820) by @jacekradkoRemove
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. (#7879) by @jacekradkoRemove all previously deprecated UI props across the Next.js, React and clerk-js SDKs. The legacy
afterSign(In|Up)Url/redirectUrlprops,UserButtonsign-out overrides, organizationhideSlugflags,OrganizationSwitcher'safterSwitchOrganizationUrl,Client.activeSessions,setActive({ beforeEmit }), and theClerkMiddlewareAuthObjecttype alias are no longer exported. Components now rely solely on the new redirect options and server-side configuration. (#7243) by @jacekradkoIntroduce
<Show when={...}>as the cross-framework authorization control component and remove<Protect>,<SignedIn>, and<SignedOut>in favor of<Show>. (#7373) by @jacekradkogetToken()now throwsClerkOfflineErrorinstead of returningnullwhen the client is offline. (#7598) by @bratsosThis makes it explicit that a token fetch failure was due to network conditions, not authentication state. Previously, returning
nullcould be misinterpreted as "user is signed out," potentially causing the cached token to be cleared.To handle this change, catch
ClerkOfflineErrorfromgetToken()calls:Drop support for
next@13andnext@14since they have reached EOL. Now>= [email protected]is required. (#7197) by @panteliselefMinor Changes
Add
unsafe_disableDevelopmentModeConsoleWarningoption to disable the development mode warning that's emitted to the console when Clerk is first loaded. (#7505) by @dstaleyAdd Frontend API proxy support via
frontendApiProxyoption inclerkMiddleware(#7602) by @brkalowIntroducing
setup_mfasession task (#7626) by @octoperRemove
clerkJSVariantoption and headless bundle. UseprefetchUI={false}instead. (#7629) by @jacekradkoAdd
uiprop toClerkProviderfor passing@clerk/ui(#7664) by @jacekradkoAdd standalone
getToken()function for retrieving session tokens outside of framework component trees. (#7325) by @bratsosThis function is safe to call from anywhere in the browser, such as API interceptors, data fetching layers (e.g., React Query, SWR), or vanilla JavaScript code. It automatically waits for Clerk to initialize before returning the token.
import { getToken } from '@clerk/nextjs'; // or any framework package
// Example: Axios interceptor
axios.interceptors.request.use(async (config) => {
const token = await getToken();
if (token) {
config.headers.Authorization =
Bearer ${token};}
return config;
});
Export
useOrganizationCreationDefaultshook to fetch suggested organization name and logo from default naming rules (#7694) by @LauraBeatrisAdd
/typessubpath export to re-export types from@clerk/shared/typesalong with SDK-specific types. This allows importing Clerk types directly from the SDK package (e.g.,import type { UserResource } from '@​clerk/react/types') without needing to install@clerk/typesas a separate dependency. (#7644) by @nikosdouvlisAdd
HandleSSOCallbackcomponent which handles the SSO callback during custom flows, including support for sign-in-or-up. (#7678) by @dstaleyIntroduce
<UNSAFE_PortalProvider>component which allows you to specify a custom container for Clerk floating UI elements (popovers, modals, tooltips, etc.) that use portals. Only Clerk components within the provider will be affected, components outside the provider will continue to use the default document.body for portals. (#7310) by @alexcarpenterThis is particularly useful when using Clerk components inside external UI libraries like Radix Dialog or React Aria Components, where portaled elements need to render within the dialog's container to remain interact-able.
Patch Changes
Fix an App Router navigation edge case where duplicate in-flight redirects to the same destination could leave Clerk's awaitable navigation pending indefinitely. (#7865) by @bratsos
Rename dev browser APIs to remove JWT terminology. The dev browser identifier is now a generic ID, so internal naming has been updated to reflect this. No runtime behavior changes. (#7930) by @brkalow
Wire
clerkUIVersionoption through all framework packages (#7740) by @nikosdouvlisFixed an issue where the CSP nonce generated by
clerkMiddleware({ contentSecurityPolicy: { strict: true } })was not forwarded as a request header. Server components can now access the nonce viaheaders(), allowingClerkProviderand Next.js to apply it to<script>tags. (#7828) by @jacekradkoFix Turbopack compatibility for
uiprop by addingturbopackIgnoremagic comment alongsidewebpackIgnoreon the dynamic@clerk/ui/entryimport. This prevents both bundlers from statically resolving the optional dependency at build time. (#7805) by @jacekradkoFix
@clerk/ui/entrybare specifier failing in browser when usinguiprop with RSC (#7809) by @jacekradkoAdd exports for
useWaitlisthook. (#7609) by @alexcarpenterUpdating peerDependency for CVE-2025-55182 (#7423) by @dominic-clerk
Fix race condition that could cause
__clerkSharedModules is not definederror when using the shared React UI variant. (#7685) by @bratsosAdd support for Next.js 16 cache components by improving error detection and providing helpful error messages when
auth()orcurrentUser()are called inside a"use cache"function. (#7595) by @jacekradkoAdd image CDNs to the
connect-srcContent Security Policy directive (#7610) by @LauraBeatrisfix: Update getAuthData to use isMachineToken (#7755) by @jeremy-clerk
Add
satelliteAutoSyncoption to optimize satellite app handshake behavior (#7597) by @nikosdouvlisSatellite apps currently trigger a handshake redirect on every first page load, even when no cookies exist. This creates unnecessary redirects to the primary domain for apps where most users aren't authenticated.
New option:
satelliteAutoSync(default:false)false(default): Skip automatic handshake if no session cookies exist, only trigger after explicit sign-in actiontrue: Satellite apps automatically trigger handshake on first load (previous behavior)New query parameter:
__clerk_sync__clerk_sync=1(NeedsSync): Triggers handshake after returning from primary sign-in__clerk_sync=2(Completed): Prevents re-sync loop after handshake completesBackwards compatible: Still reads legacy
__clerk_synced=trueparameter.SSR redirect fix: Server-side redirects (e.g.,
redirectToSignIn()from middleware) now correctly add__clerk_sync=1to the return URL for satellite apps. This ensures the handshake is triggered when the user returns from sign-in on the primary domain.CSR redirect fix: Client-side redirects now add
__clerk_sync=1to all redirect URL variants (forceRedirectUrl,fallbackRedirectUrl) for satellite apps, not just the defaultredirectUrl.Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 04:59 AM, Monday through Friday ( * 0-4 * * 1-5 ) in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.