Skip to content

Latest commit

 

History

History
1880 lines (1280 loc) · 116 KB

File metadata and controls

1880 lines (1280 loc) · 116 KB

Change Log

3.0.6

Patch Changes

  • Updated dependencies [f0533a2, e00ec97]:
    • @clerk/shared@4.3.2
    • @clerk/backend@3.2.2
    • @clerk/react@6.1.2

3.0.5

Patch Changes

  • Updated dependencies [b9cb6e5]:
    • @clerk/shared@4.3.1
    • @clerk/react@6.1.1
    • @clerk/backend@3.2.1

3.0.4

Patch Changes

3.0.3

Patch Changes

  • Updated dependencies [3e63793]:
    • @clerk/backend@3.1.0
    • @clerk/shared@4.2.0
    • @clerk/react@6.0.3

3.0.2

Patch Changes

3.0.1

Patch Changes

  • Update README prerequisites to match actual package.json engine and peer dependency constraints. (#7972) by @jacekradko

  • Updated dependencies [55ece85]:

    • @clerk/backend@3.0.1
    • @clerk/react@6.0.1

3.0.0

Major Changes

  • 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.
    async function doThingWithToken(getToken: GetToken) {
      try {
        const token = await getToken();
    
        // Use token
      } catch (error) {
        if (isClerkRuntimeError(error) && error.code === 'clerk_runtime_not_browser') {
          // Handle error
        }
      }
    }

    To access auth data server-side, see the Auth object 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 @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
  • Usage of rootAuthLoader without the clerkMiddleware() installed will not throw a runtime error. (#7796) by @wobsoriano

    Before (Removed):

    import { rootAuthLoader } from '@clerk/react-router/ssr.server';
    
    export const loader = (args: Route.LoaderArgs) => rootAuthLoader(args);

    After:

    1. Enable the v8_middleware future flag:
    // react-router.config.ts
    export default {
      future: {
        v8_middleware: true,
      },
    } satisfies Config;
    1. Use the middleware in your app:
    import { clerkMiddleware, rootAuthLoader } from '@clerk/react-router/server';
    
    export const middleware: Route.MiddlewareFunction[] = [clerkMiddleware()];
    
    export const loader = (args: Route.LoaderArgs) => rootAuthLoader(args);
  • 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

  • Remove @clerk/react-router/api.server export (use @clerk/react-router/server instead). Added codemod to automatically migrate. (#7643) 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:

    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;
    }

Minor Changes

  • Introduce Keyless quickstart for React Router. This allows the Clerk SDK to be used without having to sign up and paste your keys manually. (#7794) by @wobsoriano

  • Introducing setup_mfa session task (#7626) by @octoper

  • Remove clerkJSVariant option and headless bundle. Use prefetchUI={false} instead. (#7629) 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

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

  • 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

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

    '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

2.4.10

Patch Changes

  • Updated dependencies [76a5a1b, 7955e9d, 51bc9a9]:
    • @clerk/backend@2.33.0
    • @clerk/shared@3.47.2
    • @clerk/clerk-react@5.61.3
    • @clerk/types@4.101.20

2.4.9

Patch Changes

  • Updated dependencies [8a0c404]:
    • @clerk/shared@3.47.1
    • @clerk/backend@2.32.2
    • @clerk/clerk-react@5.61.2
    • @clerk/types@4.101.19

2.4.8

Patch Changes

  • Updated dependencies [c15c8a2]:
    • @clerk/backend@2.32.1

2.4.7

Patch Changes

  • Updated dependencies [c00c524, 9c935ad]:
    • @clerk/shared@3.47.0
    • @clerk/backend@2.32.0
    • @clerk/clerk-react@5.61.1
    • @clerk/types@4.101.18

2.4.6

Patch Changes

  • Updated dependencies [71bd53c, 935f780, 2471e31]:
    • @clerk/clerk-react@5.61.0
    • @clerk/shared@3.46.0
    • @clerk/backend@2.31.2
    • @clerk/types@4.101.17

2.4.5

Patch Changes

  • Updated dependencies [b17e4bb]:
    • @clerk/shared@3.45.1
    • @clerk/backend@2.31.1
    • @clerk/clerk-react@5.60.2
    • @clerk/types@4.101.16

2.4.4

Patch Changes

  • Updated dependencies [35bcbd1, 5740640, 03c61c1]:
    • @clerk/shared@3.45.0
    • @clerk/backend@2.31.0
    • @clerk/clerk-react@5.60.1
    • @clerk/types@4.101.15

2.4.3

Patch Changes

  • Updated dependencies [a726252]:
    • @clerk/backend@2.30.1

2.4.2

Patch Changes

2.4.1

Patch Changes

  • Updated dependencies [559cd84]:
    • @clerk/backend@2.29.7

2.4.0

Minor Changes

  • Export useOrganizationCreationDefaults hook to fetch suggested organization name and logo from default naming rules (#7690) by @LauraBeatris

Patch Changes

  • Updated dependencies [64a35f7]:
    • @clerk/shared@3.44.0
    • @clerk/clerk-react@5.60.0
    • @clerk/backend@2.29.6
    • @clerk/types@4.101.14

2.3.12

Patch Changes

  • Updated dependencies [b7a4e1e]:
    • @clerk/shared@3.43.2
    • @clerk/backend@2.29.5
    • @clerk/clerk-react@5.59.6
    • @clerk/types@4.101.13

2.3.11

Patch Changes

  • Updated dependencies [e995cc3]:
    • @clerk/shared@3.43.1
    • @clerk/clerk-react@5.59.5
    • @clerk/backend@2.29.4
    • @clerk/types@4.101.12

2.3.10

Patch Changes

  • Updated dependencies [c3ff1f8, 271ddeb, 57ff2fb]:
    • @clerk/backend@2.29.3
    • @clerk/shared@3.43.0
    • @clerk/clerk-react@5.59.4
    • @clerk/types@4.101.11

2.3.9

Patch Changes

  • Updated dependencies [6b26afc]:
    • @clerk/backend@2.29.2
    • @clerk/clerk-react@5.59.3

2.3.8

Patch Changes

  • Updated dependencies [9320c4f, a4e6932]:
    • @clerk/backend@2.29.1
    • @clerk/shared@3.42.0
    • @clerk/clerk-react@5.59.3
    • @clerk/types@4.101.10

2.3.7

Patch Changes

  • Fix React peer dependency version ranges to use ~ instead of ^ for React 19 versions, ensuring non-overlapping version constraints. (#7513) by @jacekradko

  • Updated dependencies [ede3e2a, 03dd374]:

    • @clerk/backend@2.29.0
    • @clerk/clerk-react@5.59.2
    • @clerk/shared@3.41.1
    • @clerk/types@4.101.9

2.3.6

Patch Changes

2.3.5

Patch Changes

2.3.4

Patch Changes

  • Updated dependencies [e448757]:
    • @clerk/backend@2.27.0
    • @clerk/clerk-react@5.58.1

2.3.3

Patch Changes

  • Updated dependencies [2a508d3, 0307ea8, b117ebc, 6dbb02b]:
    • @clerk/clerk-react@5.58.1
    • @clerk/shared@3.39.0
    • @clerk/backend@2.26.0
    • @clerk/types@4.101.6

2.3.2

Patch Changes

2.3.1

Patch Changes

2.3.0

Minor Changes

  • Options passed to clerkMiddleware are now properly forwarded to clerkClient, ensuring consistent configuration when manually providing options from router context. (#7292) by @spegoraro

Patch Changes

  • Updated dependencies []:
    • @clerk/clerk-react@5.57.0

2.2.5

Patch Changes

  • Updated dependencies [f85abda, 36e43cc, 337430b]:
    • @clerk/shared@3.36.0
    • @clerk/clerk-react@5.57.0
    • @clerk/backend@2.24.0
    • @clerk/types@4.101.3

2.2.4

Patch Changes

  • Updated dependencies [d8f59a6]:
    • @clerk/shared@3.35.2
    • @clerk/backend@2.23.2
    • @clerk/clerk-react@5.56.2
    • @clerk/types@4.101.2

2.2.3

Patch Changes

  • Updated dependencies [a9c13ca]:
    • @clerk/shared@3.35.1
    • @clerk/backend@2.23.1
    • @clerk/clerk-react@5.56.1
    • @clerk/types@4.101.1

2.2.2

Patch Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

Patch Changes

  • Updated dependencies [613cb97]:
    • @clerk/shared@3.33.0
    • @clerk/backend@2.21.0
    • @clerk/clerk-react@5.54.0
    • @clerk/types@4.99.0

2.1.11

Patch Changes

2.1.10

Patch Changes

  • Updated dependencies [92fba5d]:
    • @clerk/clerk-react@5.53.8

2.1.9

Patch Changes

  • Updated dependencies [a474c59, b505755, 5536429]:
    • @clerk/shared@3.31.1
    • @clerk/backend@2.20.0
    • @clerk/clerk-react@5.53.7
    • @clerk/types@4.97.2

2.1.8

Patch Changes

  • Updated dependencies [85b5acc, ea65d39, b09b29e]:
    • @clerk/types@4.97.1
    • @clerk/shared@3.31.0
    • @clerk/clerk-react@5.53.6
    • @clerk/backend@2.19.3

2.1.7

Patch Changes

  • Updated dependencies [3e0ef92, 2587aa6]:
    • @clerk/shared@3.30.0
    • @clerk/types@4.97.0
    • @clerk/backend@2.19.2
    • @clerk/clerk-react@5.53.5

2.1.6

Patch Changes

  • Fixed an issue where manually specified options in the middleware were not being respected. (#7079) by @wobsoriano

  • Updated dependencies [791ff19, 439427e, 7dfbf3a, d33b7b5, f2644c2]:

    • @clerk/shared@3.29.0
    • @clerk/types@4.96.0
    • @clerk/backend@2.19.1
    • @clerk/clerk-react@5.53.4

2.1.5

Patch Changes

  • Updated dependencies [4d46e4e, a42a015, 8ebbf1e]:
    • @clerk/types@4.95.1
    • @clerk/backend@2.19.0
    • @clerk/clerk-react@5.53.3
    • @clerk/shared@3.28.3

2.1.4

Patch Changes

  • Updated dependencies [a172d51, 947d0f5]:
    • @clerk/types@4.95.0
    • @clerk/shared@3.28.2
    • @clerk/backend@2.18.3
    • @clerk/clerk-react@5.53.2

2.1.3

Patch Changes

  • Updated dependencies [d8147fb]:
    • @clerk/shared@3.28.1
    • @clerk/backend@2.18.2
    • @clerk/clerk-react@5.53.1

2.1.2

Patch Changes

2.1.1

Patch Changes

2.1.0

Minor Changes

  • Added organizationSyncOptions option to clerkMiddleware(). It's used to activate a specific organization or personal account based on URL path parameters. (#6927) by @wobsoriano

    Usage:

    // app/root.tsx
    export const middleware: Route.MiddlewareFunction[] = [
      clerkMiddleware({
        organizationSyncOptions: {
          organizationPatterns: [
            '/orgs/:slug', // Match the org slug
            '/orgs/:slug/(.*)', // Wildcard match for optional trailing path segments
          ],
        },
      }),
    ];

    To learn more about best practices for using organization slugs to manage the active organization, check out this guide.

Patch Changes

  • Updated dependencies [fba4781, a1f6714]:
    • @clerk/types@4.92.0
    • @clerk/clerk-react@5.51.0
    • @clerk/backend@2.17.2
    • @clerk/shared@3.27.3

2.0.2

Patch Changes

  • Updated dependencies [04cba7d, f737d26, 8777f35, 2c0128b]:
    • @clerk/backend@2.17.1
    • @clerk/clerk-react@5.50.0
    • @clerk/types@4.91.0
    • @clerk/shared@3.27.2

2.0.1

Patch Changes

  • Set correct minimum react-router version in README (#6866) by @wobsoriano

  • Updated dependencies [ea2bc26, 37028ca]:

    • @clerk/backend@2.17.0
    • @clerk/types@4.90.0
    • @clerk/clerk-react@5.49.1
    • @clerk/shared@3.27.1

2.0.0

Major Changes

  • Introduce React Router middleware support with clerkMiddleware() for improved performance and streaming capabilities. (#6660) by @wobsoriano

    Usage of rootAuthLoader without the clerkMiddleware() installed is now deprecated and will be removed in the next major version.

    Before (Deprecated - will be removed):

    import { rootAuthLoader } from '@clerk/react-router/ssr.server';
    
    export const loader = (args: Route.LoaderArgs) => rootAuthLoader(args);

    After (Recommended):

    1. Enable the v8_middleware future flag:
    // react-router.config.ts
    export default {
      future: {
        v8_middleware: true,
      },
    } satisfies Config;
    1. Use the middleware in your app:
    import { clerkMiddleware, rootAuthLoader } from '@clerk/react-router/server';
    
    export const middleware: Route.MiddlewareFunction[] = [clerkMiddleware()];
    
    export const loader = (args: Route.LoaderArgs) => rootAuthLoader(args);

    Streaming Support (with middleware):

    export const middleware: Route.MiddlewareFunction[] = [clerkMiddleware()];
    
    export const loader = (args: Route.LoaderArgs) => {
      const nonCriticalData = new Promise(res => setTimeout(() => res('non-critical'), 5000));
    
      return rootAuthLoader(args, () => ({
        nonCriticalData,
      }));
    };

Minor Changes

Patch Changes

1.10.2

Patch Changes

1.10.1

Patch Changes

1.10.0

Minor Changes

Patch Changes

1.9.10

Patch Changes

1.9.9

Patch Changes

1.9.8

Patch Changes

1.9.7

Patch Changes

1.9.6

Patch Changes

  • Updated dependencies [600c648]:
    • @clerk/shared@3.23.0
    • @clerk/clerk-react@5.45.0
    • @clerk/types@4.83.0
    • @clerk/backend@2.10.1

1.9.5

Patch Changes

1.9.4

Patch Changes

1.9.3

Patch Changes

  • Updated dependencies [8dc6bad, aa6a3c3, db50c47]:
    • @clerk/types@4.80.0
    • @clerk/clerk-react@5.43.0
    • @clerk/backend@2.9.3
    • @clerk/shared@3.21.2

1.9.2

Patch Changes

  • Updated dependencies [413468c, 7b7eb1f]:
    • @clerk/shared@3.21.1
    • @clerk/types@4.79.0
    • @clerk/clerk-react@5.42.2
    • @clerk/backend@2.9.2

1.9.1

Patch Changes

  • Updated dependencies [5b24129]:
    • @clerk/shared@3.21.0
    • @clerk/types@4.78.0
    • @clerk/backend@2.9.1
    • @clerk/clerk-react@5.42.1

1.9.0

Minor Changes

Patch Changes

1.8.13

Patch Changes

1.8.12

Patch Changes

1.8.11

Patch Changes

  • Introduce TaskChooseOrganization component which replaces TaskSelectOrganization with a new UI that make the experience similar to the previous SignIn and SignUp steps (#6446) by @LauraBeatris

  • Add ability to define a machine secret key to Clerk BAPI client function (#6479) by @wobsoriano

    const clerkClient = createClerkClient({ machineSecretKey: 'ak_xxxxx' })
    
    clerkClient.m2mTokens.create({...})
  • Updated dependencies [1ad16da, 4edef81, 6ff416f, e82f177, 696f8e1, f318d22, 0d27281, 1cc66ab]:

    • @clerk/clerk-react@5.40.0
    • @clerk/types@4.74.0
    • @clerk/backend@2.7.0
    • @clerk/shared@3.18.1

1.8.10

Patch Changes

  • Updated dependencies [9368daf, f93965f, 7b6dcee, ef87617]:
    • @clerk/shared@3.18.0
    • @clerk/clerk-react@5.39.0
    • @clerk/types@4.73.0
    • @clerk/backend@2.6.3

1.8.9

Patch Changes

1.8.8

Patch Changes

1.8.7

Patch Changes

  • Updated dependencies [2bbeaf3, cfa7882, b0fdc9e]:
    • @clerk/backend@2.6.0
    • @clerk/clerk-react@5.37.0
    • @clerk/types@4.70.1
    • @clerk/shared@3.15.1

1.8.6

Patch Changes

  • Updated dependencies [8feb59b, cd59c0e, cd59c0e]:
    • @clerk/clerk-react@5.36.0
    • @clerk/types@4.70.0
    • @clerk/shared@3.15.0
    • @clerk/backend@2.5.2

1.8.5

Patch Changes

1.8.4

Patch Changes

1.8.3

Patch Changes

  • Updated dependencies [2a90b68, af50905]:
    • @clerk/clerk-react@5.35.2
    • @clerk/types@4.67.0
    • @clerk/shared@3.12.3
    • @clerk/backend@2.4.5

1.8.2

Patch Changes

  • Updated dependencies [8ee859c]:
    • @clerk/shared@3.12.2
    • @clerk/types@4.66.1
    • @clerk/backend@2.4.4
    • @clerk/clerk-react@5.35.1

1.8.1

Patch Changes

  • Updated dependencies [025e304, dedf487, b96114e]:
    • @clerk/types@4.66.0
    • @clerk/clerk-react@5.35.0
    • @clerk/backend@2.4.3
    • @clerk/shared@3.12.1

1.8.0

Minor Changes

  • [Billing Beta]: Introduce experimental useCheckout() hook and <CheckoutProvider/>. (#6195) by @panteliselef

Patch Changes

1.7.0

Minor Changes

  • Export experimental hooks and components for PaymentElement (#6180) by @panteliselef
    • __experimental_usePaymentElement
    • __experimental_PaymentElementProvider
    • __experimental_PaymentElement

Patch Changes

  • Updated dependencies [f42c4fe, ec207dc, ec207dc, 0e0cc1f]:
    • @clerk/types@4.64.0
    • @clerk/clerk-react@5.33.0
    • @clerk/shared@3.11.0
    • @clerk/backend@2.4.1

1.6.4

Patch Changes

1.6.3

Patch Changes

  • Updated dependencies [02a1f42, edc0bfd]:
    • @clerk/shared@3.10.1
    • @clerk/clerk-react@5.32.3
    • @clerk/types@4.62.1
    • @clerk/backend@2.3.1

1.6.2

Patch Changes

  • Updated dependencies [f1be1fe, 8bfdf94, bffb42a, 084e7cc]:
    • @clerk/types@4.62.0
    • @clerk/backend@2.3.0
    • @clerk/shared@3.10.0
    • @clerk/clerk-react@5.32.2

1.6.1

Patch Changes

1.6.0

Minor Changes

  • Introduces machine authentication, supporting four token types: api_key, oauth_token, machine_token, and session_token. For backwards compatibility, session_token remains the default when no token type is specified. This enables machine-to-machine authentication and use cases such as API keys and OAuth integrations. Existing applications continue to work without modification. (#6067) by @wobsoriano

    You can specify which token types are allowed by using the acceptsToken option in the getAuth() function. This option can be set to a specific type, an array of types, or 'any' to accept all supported tokens.

    Example usage:

    import { getAuth } from '@clerk/react-router/ssr.server';
    import type { Route } from './+types/profile';
    
    export async function loader(args: Route.LoaderArgs) {
      const authObject = await getAuth(args, { acceptsToken: 'any' });
    
      if (authObject.tokenType === 'session_token') {
        console.log('this is session token from a user');
      } else {
        console.log('this is some other type of machine token');
        console.log('more specifically, a ' + authObject.tokenType);
      }
    
      return {};
    }

Patch Changes

1.5.0

Minor Changes

  • Machine authentication is now supported for advanced use cases via the backend SDK. You can use clerkClient.authenticateRequest to validate machine tokens (such as API keys, OAuth tokens, and machine-to-machine tokens). No new helpers are included in these packages yet. (#5689) by @wobsoriano

    Example (Astro):

    import { clerkClient } from '@clerk/astro/server';
    
    export const GET: APIRoute = ({ request }) => {
      const requestState = await clerkClient.authenticateRequest(request, {
        acceptsToken: 'api_key',
      });
    
      if (!requestState.isAuthenticated) {
        return new Response(401, { message: 'Unauthorized' });
      }
    
      return new Response(JSON.stringify(requestState.toAuth()));
    };
  • The svix dependency is no longer needed when using the verifyWebhook() function. verifyWebhook() was refactored to not rely on svix anymore while keeping the same functionality and behavior. (#6059) by @royanger

    If you previously installed svix to use verifyWebhook() you can uninstall it now:

    npm uninstall svix

Patch Changes

  • In this release the TypeScript types for rootAuthLoader(), getAuth(), and <ClerkProvider> were adjusted but should still work as before. Previously, these types relied on internal, unstable React Router types that changed in their recent 7.6.1 release. We simplified our TypeScript types and no longer rely on internal exports from React Router. (#6019) by @LekoArts

  • Updated dependencies [ea622ba, d8fa5d9, be2e89c, c656270, 5644d94, a3232c7, b578225, 918e2e0, 795d09a, 4f93634, 8838120]:

    • @clerk/backend@2.0.0
    • @clerk/types@4.60.0
    • @clerk/clerk-react@5.31.9
    • @clerk/shared@3.9.6

1.4.8

Patch Changes

1.4.7

Patch Changes

  • Updated dependencies [6ed3dfc, 22c3363, ac6b231]:
    • @clerk/types@4.59.2
    • @clerk/backend@1.33.1
    • @clerk/clerk-react@5.31.7
    • @clerk/shared@3.9.4

1.4.6

Patch Changes

  • Updated dependencies [ced8912, f237d76, 5f1375b]:
    • @clerk/backend@1.33.0
    • @clerk/shared@3.9.3
    • @clerk/clerk-react@5.31.6

1.4.5

Patch Changes

  • Updated dependencies [c305b31, b813cbe, 6bb480e]:
    • @clerk/types@4.59.1
    • @clerk/backend@1.32.3
    • @clerk/shared@3.9.2
    • @clerk/clerk-react@5.31.5

1.4.4

Patch Changes

1.4.3

Patch Changes

  • Updated dependencies [1ff6d6e, fbf3cf4]:
    • @clerk/shared@3.9.0
    • @clerk/types@4.58.1
    • @clerk/clerk-react@5.31.3
    • @clerk/backend@1.32.1

1.4.2

Patch Changes

1.4.1

Patch Changes

1.4.0

Minor Changes

  • Export a new <PricingTable /> component. This component renders plans for user or organizations and upon selection the end-user is prompted with a checkout form. (#5833) by @nikosdouvlis

  • Mark commerce apis as stable (#5833) by @nikosdouvlis

Patch Changes

1.3.5

Patch Changes

  • Updated dependencies [9ec0a73, d9222fc]:
    • @clerk/types@4.56.3
    • @clerk/backend@1.31.2
    • @clerk/clerk-react@5.30.4
    • @clerk/shared@3.7.8

1.3.4

Patch Changes

  • Updated dependencies [225b9ca]:
    • @clerk/types@4.56.2
    • @clerk/backend@1.31.1
    • @clerk/clerk-react@5.30.3
    • @clerk/shared@3.7.7

1.3.3

Patch Changes

1.3.2

Patch Changes

  • Fix handshake redirect loop in applications deployed to Netlify with a Clerk development instance. (#5656) by @wobsoriano

  • Updated dependencies [387bf62, 2716622, 294da82, 4a8fe40]:

    • @clerk/types@4.56.1
    • @clerk/shared@3.7.6
    • @clerk/backend@1.30.2
    • @clerk/clerk-react@5.30.2

1.3.1

Patch Changes

1.3.0

Minor Changes

Patch Changes

  • Updated dependencies [ba19465, 8b25035, f0f1ed7, 25c3502]:
    • @clerk/backend@1.30.0
    • @clerk/types@4.55.1
    • @clerk/clerk-react@5.30.0
    • @clerk/shared@3.7.4

1.2.8

Patch Changes

  • Updated dependencies [4334598, 33201bf, 4334598, 0ae0403]:
    • @clerk/clerk-react@5.29.0
    • @clerk/types@4.55.0
    • @clerk/backend@1.29.2
    • @clerk/shared@3.7.3

1.2.7

Patch Changes

  • Updated dependencies [45486ac, 837692a, 0c00e59, 6a5f644]:
    • @clerk/types@4.54.2
    • @clerk/backend@1.29.1
    • @clerk/shared@3.7.2
    • @clerk/clerk-react@5.28.2

1.2.6

Patch Changes

1.2.5

Patch Changes

1.2.4

Patch Changes

  • Updated dependencies [70c9db9, 554242e, cc1f9a0, 8186cb5]:
    • @clerk/backend@1.27.3
    • @clerk/shared@3.6.0
    • @clerk/clerk-react@5.27.0
    • @clerk/types@4.53.0

1.2.3

Patch Changes

1.2.2

Patch Changes

  • Updated dependencies [f6f275d]:
    • @clerk/backend@1.27.1
    • @clerk/types@4.51.1
    • @clerk/clerk-react@5.26.1
    • @clerk/shared@3.4.1

1.2.1

Patch Changes

1.2.0

Minor Changes

  • Introduce a verifyWebhook() function to verify incoming Clerk webhook requests and process the payload. This function handles webhook signature verification using Svix and is now available across all backend and fullstack SDKs. (#5468) by @wobsoriano

    To get started, install svix, which Clerk uses to verify its webhooks:

    npm install svix

    Then in your webhook route handler, import verifyWebhook() from the React Router SDK:

    import { verifyWebhook } from '@clerk/react-router/webhooks';
    
    export const action = async ({ request }) => {
      try {
        const evt = await verifyWebhook(request);
    
        // Do something with payload
        const { id } = evt.data;
        const eventType = evt.type;
        console.log(`Received webhook with ID ${id} and event type of ${eventType}`);
        console.log('Webhook payload:', evt.data);
    
        return new Response('Webhook received', { status: 200 });
      } catch (err) {
        console.log('Error: Could not verify webhook:', err);
        return new Response('Error: Verification error', {
          status: 400,
        });
      }
    };

    For more information on how to sync Clerk data to your app with webhooks, see our guide.

Patch Changes

1.1.11

Patch Changes

  • Updated dependencies [e20fb6b, 77e6462]:
    • @clerk/shared@3.2.3
    • @clerk/types@4.50.1
    • @clerk/clerk-react@5.25.5
    • @clerk/backend@1.25.8

1.1.10

Patch Changes

  • Updated dependencies [1da28a2, a9b618d, f20dc15, 4d9f1ee]:
    • @clerk/types@4.50.0
    • @clerk/shared@3.2.2
    • @clerk/backend@1.25.7
    • @clerk/clerk-react@5.25.4

1.1.9

Patch Changes

  • Updated dependencies [27d66a5, 466ed13]:
    • @clerk/backend@1.25.6
    • @clerk/types@4.49.2
    • @clerk/clerk-react@5.25.3
    • @clerk/shared@3.2.1

1.1.8

Patch Changes

  • Updated dependencies [892bc0e, 892bc0e]:
    • @clerk/backend@1.25.5
    • @clerk/shared@3.2.0
    • @clerk/clerk-react@5.25.2

1.1.7

Patch Changes

  • Export isReverificationCancelledError error helper (#5396) by @octoper

  • Updated dependencies [facefaf, e513333, 3910ebe, e513333]:

    • @clerk/backend@1.25.4
    • @clerk/clerk-react@5.25.1
    • @clerk/types@4.49.1
    • @clerk/shared@3.1.0

1.1.6

Patch Changes

1.1.5

Patch Changes

1.1.4

Patch Changes

1.1.3

Patch Changes

1.1.2

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

  • Introduce EmailLinkErrorCodeStatus to support users in custom flows and mark EmailLinkErrorCode as deprecated. (#5142) by @alexcarpenter

    - import { EmailLinkErrorCode } from '@clerk/nextjs/errors'
    + import { EmailLinkErrorCodeStatus } from '@clerk/nextjs/errors'

Patch Changes

1.0.8

Patch Changes

1.0.7

Patch Changes

1.0.6

Patch Changes

1.0.5

Patch Changes

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

  • No changes have been made to the SDK in this update. There are no breaking changes. (#4966) by @LekoArts

    This merely bumps the version to a non-zero range and moves the SDK out of beta to a stable release.

Patch Changes

0.2.3

Patch Changes

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

Patch Changes

0.1.10

Patch Changes

0.1.9

Patch Changes

0.1.8

Patch Changes

0.1.7

Patch Changes

  • Previously, when the data() utility was used inside the callback of rootAuthLoader() type errors were thrown. These issues should be fixed now. (#4853) by @LekoArts

  • Updated dependencies [44cab6038af0a4d23869b3b292ece742fbbc4d85]:

    • @clerk/backend@1.21.6
    • @clerk/types@4.40.2
    • @clerk/clerk-react@5.21.2
    • @clerk/shared@2.20.6

0.1.6

Patch Changes

0.1.5

Patch Changes

0.1.4

Patch Changes

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • Switching to use ^ for semver ranges of internal @clerk/ production dependencies. (#4664) by @jacekradko

Patch Changes

0.0.2

Patch Changes

0.0.1

Patch Changes