Packages

@clerk/nuxt

3.1.24 · 14 Nov 2026MIT36.2k / weekRepositoryHomepagenpmAtom feed

Your version

2.0.0

major3 Mar 2026Where it was published

2.6.23 is the newest release of 2.x.

In short

5 breaking1 removed3 new1 fixed6 changed3 internal

  • Breaking

    Require Node.js 20.9.0 in all packages

  • Breaking

    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.

  • Breaking

    Introduce <Show when={...}> as the cross-framework authorization control component and remove <Protect>, <SignedIn>, and <SignedOut> in favor of <Show>.

  • Breaking

    Removed deprecated getAuth() helper. Use event.context.auth() in your server routes instead.

  • Breaking

    getToken() now throws ClerkOfflineError instead of returning null when the client is offline.

  • Removed

    Remove clerkJSVariant option and headless bundle. Use prefetchUI={false} instead.

Security

2 advisories affect 2.0.0; 2.2.5 fixes them

Release note

Major Changes

  • Breaking

    Require Node.js 20.9.0 in all packages

  • Breaking

    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.

  • Breaking

    Introduce <Show when={...}> as the cross-framework authorization control component and remove <Protect>, <SignedIn>, and <SignedOut> in favor of <Show>.

  • Breaking

    Removed deprecated getAuth() helper. Use event.context.auth() in your server routes instead.

    export default defineEventHandler(event => {
      const { userId } = event.context.auth();
    
      return {
        userId,
      };
    });
  • Breaking

    getToken() now throws ClerkOfflineError instead of returning null when the client is offline.

    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:

    import { ClerkOfflineError } from '@clerk/react/errors';
    
    try {
      const token = await session.getToken();
    } catch (error) {
      if (ClerkOfflineError.is(error)) {
        // Handle offline scenario - show offline UI, retry later, etc.
      }
      throw error;
    }
  • Breaking

    Routing strategy for the ff. components now default to path:

    • <SignIn />

    • <SignUp />

    • <UserProfile />

    • <OrganizationProfile />

    • <CreateOrganization />

    • <OrganizationList />

Minor Changes

  • Removed

    Remove clerkJSVariant option and headless bundle. Use prefetchUI={false} instead.

  • Add standalone getToken() function for retrieving session tokens outside of framework component trees.

    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

    // Example: Axios interceptor
    axios.interceptors.request.use(async (config) => {
    const token = await getToken();
    if (token) {
    config.headers.Authorization = Bearer ${token};
    }
    return config;
    });

  • 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.

  • 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.

    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.

    'use client';
    
    import { useRef } from 'react';
    import * as Dialog from '@radix-ui/react-dialog';
    import { UNSAFE_PortalProvider, UserButton } from '@clerk/nextjs';
    
    export function UserDialog() {
      const containerRef = useRef<HTMLDivElement>(null);
    
      return (
        <Dialog.Root>
          <Dialog.Trigger>Open Dialog</Dialog.Trigger>
          <Dialog.Portal>
            <Dialog.Overlay />
            <Dialog.Content ref={containerRef}>
              <UNSAFE_PortalProvider getContainer={() => containerRef.current}>
                <UserButton />
              </UNSAFE_PortalProvider>
            </Dialog.Content>
          </Dialog.Portal>
        </Dialog.Root>
      );
    }

Patch Changes

  • Wire clerkUIVersion option through all framework packages

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.