Packages

@clerk/nextjs

7.10.2 · 17 Nov 2026MIT4.2M / weekRepositoryHomepagenpmAtom feed

Your version

6.1.0

31 Oct 2024Where it was published

6.39.9 is the newest release of 6.x.

In short

3 new2 fixed4 internal

Security

2 advisories affect 6.1.0; 6.39.3 fixes them

Release note

Minor Changes

  • Bug fix: For next>=14 applications resolve __unstable__onBeforeSetActive once invalidateCacheAction resolves.

  • Introduce a new experimental hook called useReverification that makes it easy to handle reverification errors.

    It returns a high order function (HOF) and allows developers to wrap any function that triggers a fetch request which might fail due to a user's session verification status.
    When such error is returned, the recommended UX is to offer a way to the user to recover by re-verifying their credentials.
    This helper will automatically handle this flow in the developer's behalf, by displaying a modal the end-user can interact with.
    Upon completion, the original request that previously failed, will be retried (only once).

    Example with clerk-js methods.

    import { __experimental_useReverification as useReverification } from "@clerk/nextjs";
    
    function DeleteAccount() {
      const { user } = useUser();
      const [deleteUserAccount] = useReverification(() => {
        if (!user) return;
        return user.delete();
      });
    
      return (
        <>
          <button
            onClick={async () => {
              await deleteUserAccount();
            }}
          >
            Delete account
          </button>
        </>
      );
    }
  • Replace next/headers with ezheaders

Patch Changes

  • Fixes a bug where <ClerkProvider dynamic> would error when rendered in a Next.js 13 application using the App Router.

  • Updating peerDependencies for correct ranges

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.