Skip to main content

Clerk Changelog

"Personal Accounts" disabled by default

Category
Organizations
Published

B2B applications can now enforce organization membership much more easily

Starting today for new applications, when you enable our Organizations featureset, your users will be required to create or join an organization. Previously, we defaulted to allowing a "Personal Account" which caused many of you building B2B applications to add workarounds to force organization membership. We had it backwards.

And if you're using Clerk components, this just works. Users are immediately prompted upon sign-up or sign-in.

Opt-in to Personal Accounts

If you'd still like Personal Accounts to exist alongside Organizations in for your application, thats still possible. Simply toggle "Enable Personal Account" at the moment you enable organization or in the Organization settings in the Clerk Dashboard.

Migration considerations

Due to the way this could change some of the way your application handles sessions, this functionality is only available for newly created applications. If you're running an existing application and want to adopt the new default, please contact our support team to discuss a migration strategy.

Learn more

For detailed implementation guides and examples, check out our documentation on organization-based authentication.

Contributors
Laura Beatris
Nicolas Lopes
Iago Dahlem

Share this article

User cohorts in growth charts

Category
Dashboard
Published

Trace growth metrics all the way down to the user

We recently shipped an updated growth chart in the Clerk Dashboard, giving better insight into your application’s growth—including detailed statuses like new, reactivated, retained, and even churned users.

Our latest upgrade goes a step further and now shows you exactly which users are part of those cohorts, enabling even more visibility into your application's growth and performance over time.

Example screenshot of chart and user cohort table

Note: The table of recent sign-ups has been replaced with user cohorts, providing a clearer and more detailed view of your users' activity.

Clerk is determined to become the best place for founders and builders to observe and understand their users. Head to the Overview section of the Clerk Dashboard to see it in action, and stay tuned for more.

Contributors
Josh Rowley
Max Barvian
Austin Calvelage
Nate Watkin

Share this article

Production Testing Tokens

Category
Testing
Published

Testing Tokens are now supported in production environments

Testing Tokens allow your automated tests to bypass Clerk's bot protections that might otherwise be triggered when interacting with Clerk-powered applications via automated browser agents. Previously, Testing Tokens were only for testing against Clerk development instances. With this update, Testing Tokens are now supported by Clerk production instances, allowing you to write tests against your production environment.

To make testing authenticated pages easier, the existing signIn test helper now allows authenticating a user directly by email address.

import { signIn } from '@clerk/testing/playwright'

test('sign in', async ({ page }) => {
  await signIn({ emailAddress: process.env.TEST_USER_EMAIL, page })

  // Navigate to a protected page for additional testing
  await page.goto('/protected')
})

To learn more about Testing Tokens, visit the documentation.

Contributors
Bryce Kalow
Alex Ntousias

Share this article

M2M Tokens Public Beta

Category
M2M
Published

We're excited to announce that M2M tokens are now available in public beta, bringing secure authentication for communication between your backend services.

M2M tokens are designed specifically for authenticating requests between different machines within your backend infrastructure. Whether you're building microservices, background workers, or distributed systems, M2M tokens provide a secure way for your services to communicate with each other.

This is distinct from our other machine authentication offerings:

Configure Machine Communication with Ease

Create and configure machines directly from the Clerk Dashboard or via our API or SDKs. You have complete control over which machines can communicate with each other, allowing you to implement the principle of least privilege across your infrastructure.

Tokens can be customized with:

  • Custom claims to pass additional context between services
  • Configurable expiration times for enhanced security
  • Instant revocation when you need to immediately cut off access

Simple Integration

Creating and verifying M2M tokens is straightforward with our SDKs:

// Create a token on Machine A
const m2mToken = await clerkClient.m2m.createToken()

// Send authenticated request to Machine B
await fetch('<machine-b-url>', {
  headers: {
    Authorization: `Bearer ${m2mToken.token}`,
  },
})

// Verify the token on Machine B
const verified = await clerkClient.m2m.verifyToken({ token })

Pricing

M2M tokens are free to use during the beta period. After general availability, they'll move to a simple usage-based pricing model. The pricing will be:

  • $0.001 per token creation
  • $0.0001 per token verification (for opaque tokens)

We'll provide usage stats, monitoring, and rate limiting in the Dashboard before the beta period ends, so you'll have complete visibility and control over your usage and costs. We're also planning to add support for JWT tokens before the beta period ends, which will only incur charges for creation, not verification.

Get Started Today

Ready to secure your backend service communication? Check out our resources to get started:

We'd love to hear your feedback as you try out M2M tokens. Your input during the beta period will help us refine the feature and ensure it meets your needs. Have questions or suggestions? Reach out through our feedback portal or join the discussion in our Discord community.

Contributors
Jeff Escalante
Brandon Romano
Robert Soriano
Ben Werner

Share this article

shadcn/ui registry support

Category
Product
Published

Get started with Clerk authentication in Next.js apps using the shadcn/ui CLI

Clerk sign-up page using shadcn/ui registry

Clerk components are now available through the Clerk component registry, which is fully compatible with the shadcn/ui CLI. This integration brings the familiar shadcn add workflow to Clerk, making it easier than ever to add authentication to your Next.js applications with pre-configured components that match your shadcn/ui theme.

What's included

The Clerk component registry includes everything you need to get started with Clerk authentication in a Next.js project:

  • Complete quickstart setup - Layout, sign-in/up pages, middleware, and components
  • Individual components - ClerkProvider, authentication pages, and middleware
  • Pre-configured theming - Automatic shadcn/ui theme integration
  • Environment variables - Automatic setup for required Clerk configuration

Quick Start

Add Clerk to your project with the quickstart block:

terminal
npx shadcn@latest add https://clerk.com/r/nextjs-quickstart.json
terminal
pnpm dlx shadcn@latest add https://clerk.com/r/nextjs-quickstart.json
terminal
yarn shadcn@latest add https://clerk.com/r/nextjs-quickstart.json
terminal
bunx --bun shadcn@latest add https://clerk.com/r/nextjs-quickstart.json

This single command will install:

  • App layout with ClerkProvider and theme integration
  • Sign-in and sign-up pages with catch-all routes
  • Clerk middleware for route protection
  • Header component with authentication buttons
  • Theme provider for dark/light mode support

Individual Components

Prefer to install components individually? You can add specific pieces as needed.

Authentication Pages

terminal
npx shadcn@latest add https://clerk.com/r/nextjs-sign-in-page.json
terminal
pnpm dlx shadcn@latest add https://clerk.com/r/nextjs-sign-in-page.json
terminal
yarn shadcn@latest add https://clerk.com/r/nextjs-sign-in-page.json
terminal
bunx --bun shadcn@latest add https://clerk.com/r/nextjs-sign-in-page.json
terminal
npx shadcn@latest add https://clerk.com/r/nextjs-sign-up-page.json
terminal
pnpm dlx shadcn@latest add https://clerk.com/r/nextjs-sign-up-page.json
terminal
yarn shadcn@latest add https://clerk.com/r/nextjs-sign-up-page.json
terminal
bunx --bun shadcn@latest add https://clerk.com/r/nextjs-sign-up-page.json

ClerkProvider Component

terminal
npx shadcn@latest add https://clerk.com/r/nextjs-clerk-provider.json
terminal
pnpm dlx shadcn@latest add https://clerk.com/r/nextjs-clerk-provider.json
terminal
yarn shadcn@latest add https://clerk.com/r/nextjs-clerk-provider.json
terminal
bunx --bun shadcn@latest add https://clerk.com/r/nextjs-clerk-provider.json

Clerk Middleware

terminal
npx shadcn@latest add https://clerk.com/r/nextjs-middleware.json
terminal
pnpm dlx shadcn@latest add https://clerk.com/r/nextjs-middleware.json
terminal
yarn shadcn@latest add https://clerk.com/r/nextjs-middleware.json
terminal
bunx --bun shadcn@latest add https://clerk.com/r/nextjs-middleware.json

To learn more about the available pages, components, and files, see the Next.js shadcn/ui registry documentation.

What's Next

This initial release focuses on Next.js support. We're actively working on expanding the Clerk component registry to include components for other popular frameworks and meta-frameworks in the future. If you're interested in support for a specific framework, please let us know which one you'd like to see next!

Contributor
Alex Carpenter

Share this article

Enabled ability to fetch billing plans

Category
Billing
Published

Enabled ability to fetch a list of billing plans

We're excited to announce a new feature: you can now fetch all billing plans for your application directly from our Backend API via GET /v1/commerce/plans. This gives you full flexibility to display your pricing plans however you'd like, whether it's a custom pricing page or a plan comparison chart tailed to your users.

Usage with Next.js

import { clerkClient } from '@clerk/nextjs/server'

export async function getPricingTable() {
  const client = await clerkClient()
  return client.billing.getPlanList()
}

To demonstrate what's possible in the latest Next.js versions we've put together an example that utilizes this new endpoint and renders a "cached" pricing table that is SEO-friendly and revalidates on demand.

Checkout the GitHub repo or execute the command below to clone it.

git clone https://github.com/clerk/cached-pricing-table.git
Contributors
Lamone Armstrong
Pantelis Eleftheriadis

Share this article