You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align experimental/unstable prefixes to use consistent naming: (#7361) by @brkalow
Renamed all __unstable_* methods to __internal_* (for internal APIs)
Renamed all experimental__* and experimental_* methods to __experimental_* (for beta features)
Removed deprecated billing-related props (__unstable_manageBillingUrl, __unstable_manageBillingLabel, __unstable_manageBillingMembersLimit) and experimental__forceOauthFirst
Renamed __unstable_invokeMiddlewareOnAuthStateChange to __internal_invokeMiddlewareOnAuthStateChange. (#7925) by @jacekradko
useAuth().getToken is no longer undefined during server-side rendering, it is a function and calling it will throw. (#7730) by @Ephem
If you are only using getToken in useEffect, event handlers or with non-suspenseful data fetching libraries, no change is necessary as these only trigger on the client.
If you are using suspenseful data fetching libraries that do trigger during SSR, you likely have strategies in place to avoid calling getToken already, since this has never been possible.
If you are using getToken === undefined checks to avoid calling it, know that it will now throw instead and you should catch and handle the error.
asyncfunctiondoThingWithToken(getToken: GetToken){try{consttoken=awaitgetToken();// Use token}catch(error){if(isClerkRuntimeError(error)&&error.code==='clerk_runtime_not_browser'){// Handle error}}}
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 @Ephem
Breaking changes:
Removes ability to pass in initialAuthState to useAuth
This was added for internal use and is no longer needed
Instead pass in initialState to the <ClerkProvider>, or dynamic if using the Next package
See your specific SDK documentation for more information on Server Rendering
Fixes:
A bug where useAuth would sometimes briefly return the initialState rather than undefined
This could in certain situations incorrectly lead to a brief user: null on the first page after signing in, indicating a signed out state
Hydration mismatches in certain rare scenarios where subtrees would suspend and hydrate only after clerk-js had loaded fully
Throw an error when an encryption key is missing when passing a secret key at runtime clerkMiddleware(). To migrate, ensure your application specifies a CLERK_ENCRYPTION_KEY environment variable when passing secretKey as a runtime option. (#7360) by @brkalow
Return 401 instead of 404 for unauthenticated server action requests in auth.protect() (#7820) by @jacekradko
Remove clerkJSUrl, clerkJSVersion, clerkUIUrl, and clerkUIVersion props from all SDKs. To pin a specific version of @clerk/clerk-js, import the Clerk constructor from @clerk/clerk-js and pass it to ClerkProvider via the Clerk prop. To pin a specific version of @clerk/ui, import ui from @clerk/ui and pass it via the ui prop. This bundles the modules directly with your application instead of loading them from the CDN. (#7879) by @jacekradko
Remove all previously deprecated UI props across the Next.js, React and clerk-js SDKs. The legacy afterSign(In|Up)Url/redirectUrl props, UserButton sign-out overrides, organization hideSlug flags, OrganizationSwitcher's afterSwitchOrganizationUrl, Client.activeSessions, setActive({ beforeEmit }), and the ClerkMiddlewareAuthObject type alias are no longer exported. Components now rely solely on the new redirect options and server-side configuration. (#7243) by @jacekradko
Introduce <Show when={...}> as the cross-framework authorization control component and remove <Protect>, <SignedIn>, and <SignedOut> in favor of <Show>. (#7373) by @jacekradko
getToken() now throws ClerkOfflineError instead of returning null when the client is offline. (#7598) by @bratsos
This makes it explicit that a token fetch failure was due to network conditions, not authentication state. Previously, returning null could be misinterpreted as "user is signed out," potentially causing the cached token to be cleared.
To handle this change, catch ClerkOfflineError from getToken() calls:
Drop support for next@13 and next@14 since they have reached EOL. Now >= next@15.2.3 is required. (#7197) by @panteliselef
Minor Changes
Add unsafe_disableDevelopmentModeConsoleWarning option to disable the development mode warning that's emitted to the console when Clerk is first loaded. (#7505) by @dstaley
Add Frontend API proxy support via frontendApiProxy option in clerkMiddleware (#7602) by @brkalow
Remove clerkJSVariant option and headless bundle. Use prefetchUI={false} instead. (#7629) by @jacekradko
Add ui prop to ClerkProvider for passing @clerk/ui (#7664) by @jacekradko
Add standalone getToken() function for retrieving session tokens outside of framework component trees. (#7325) by @bratsos
This 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
Export useOrganizationCreationDefaults hook to fetch suggested organization name and logo from default naming rules (#7694) by @LauraBeatris
Add /types subpath export to re-export types from @clerk/shared/types along 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/types as a separate dependency. (#7644) by @nikosdouvlis
Add HandleSSOCallback component which handles the SSO callback during custom flows, including support for sign-in-or-up. (#7678) by @dstaley
Introduce <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 @alexcarpenter
This 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.
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 clerkUIVersion option through all framework packages (#7740) by @nikosdouvlis
Fixed 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 via headers(), allowing ClerkProvider and Next.js to apply it to <script> tags. (#7828) by @jacekradko
Fix Turbopack compatibility for ui prop by adding turbopackIgnore magic comment alongside webpackIgnore on the dynamic @clerk/ui/entry import. This prevents both bundlers from statically resolving the optional dependency at build time. (#7805) by @jacekradko
Fix @clerk/ui/entry bare specifier failing in browser when using ui prop with RSC (#7809) by @jacekradko
Fix race condition that could cause __clerkSharedModules is not defined error when using the shared React UI variant. (#7685) by @bratsos
Add support for Next.js 16 cache components by improving error detection and providing helpful error messages when auth() or currentUser() are called inside a "use cache" function. (#7595) by @jacekradko
Add image CDNs to the connect-src Content Security Policy directive (#7610) by @LauraBeatris
Add satelliteAutoSync option to optimize satellite app handshake behavior (#7597) by @nikosdouvlis
Satellite 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)
When false (default): Skip automatic handshake if no session cookies exist, only trigger after explicit sign-in action
When true: 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 completes
Backwards compatible: Still reads legacy __clerk_synced=true parameter.
SSR redirect fix: Server-side redirects (e.g., redirectToSignIn() from middleware) now correctly add __clerk_sync=1 to 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=1 to all redirect URL variants (forceRedirectUrl, fallbackRedirectUrl) for satellite apps, not just the default redirectUrl.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) in timezone Europe/Amsterdam.
🚦 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.
If you want to rebase/retry this PR, check this box
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.
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
apps/cockpitAnything related to Northware CockpitdependenciesPull requests that update a dependency filepackages/authAnything related to the @northware/auth packagepackages/uiAnything related to the @northware/ui package
0 participants
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.5Release Notes
clerk/javascript (@clerk/nextjs)
v7.0.5Compare Source
Patch Changes
b9cb6e5]: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>= next@15.2.3is 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 - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) in timezone Europe/Amsterdam.
🚦 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.