Clerk Changelog

Changelog Feb 10, 2023

Category
Company
Published

Introducing @clerk/fastify , Redwood v4 support, Next.js Middleware page protection and improvements to components.

The team has been making improvements to the Clerk product and introducing new packages, here is a round up from the last two weeks.

Introducing @clerk/fastify

We had a a number of requests recently for a dedicated package for Fastify and as of today you can now use Clerk with Fastify using our latest package.

To learn how it works check out our new getting started guide in our docs or our fastify starter repository.

Redwood v4 support

Our Clerk integration for Redwood has been upgraded to be able to support Redwood V4. With that you can check out the latest integration guide in the Redwood documentation.

Next.js middleware protection strategy

We introduced middleware as a way to protect pages during the month of November, after a few tweaks and improvements. We are happy to announce this is now the recommended way to protect your pages. Below is an example of using Clerk + Middleware together.

middleware.ts
import { withClerkMiddleware, getAuth } from '@clerk/nextjs/server'
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

// Set the paths that don't require the user to be signed in
const publicPaths = ['/', '/sign-in*', '/sign-up*']

const isPublic = (path: string) => {
  return publicPaths.find((x) => path.match(new RegExp(`^${x}$`.replace('*$', '($|)'))))
}

export default withClerkMiddleware((request: NextRequest) => {
  if (isPublic(request.nextUrl.pathname)) {
    return NextResponse.next()
  }
  // if the user is not signed in redirect them to the sign in page.
  const { userId } = getAuth(request)

  if (!userId) {
    // redirect the users to /pages/sign-in/[[...index]].ts

    const signInUrl = new URL('/sign-in', request.url)
    signInUrl.searchParams.set('redirect_url', request.url)
    return NextResponse.redirect(signInUrl)
  }
  return NextResponse.next()
})

export const config = { matcher: '/((?!.*\\.).*)' }

Note

The Control Components strategy can continued to be used and we have no plans to remove this strategy.

Clerk Component improvements

We made some improvements to the Clerk components now if a user opens any Clerk component in a modal on a mobile phone they will present with a cross in the top right corner to close them.

Changes to User Impersonation

User impersonation is now only accessible in the Clerk dashboard if the user has the role of admin or is in their own personal space.

How to stay up to date with Clerk?

The best way to keep up with Clerk is to subscribe to our newsletter. We send out updates every week. Updates include new features, what we have been working on, and blog posts you may have missed!

Clerk Community Discord

Clerk has a community Discord. When you join, you will find a place:

  • Find the latest Clerk news and announcements
  • Share your project with the Clerk community, and talk about your experience
  • Request features and gets help integrating Clerk from the team and community.

Clerk Twitter

Our Twitter account (@clerkdev) announces the latest features and improvements. We would also be psyched if you tagged us in projects you have built.

Contributor
James Perkins

Changelog January 27, 2023

Category
Company
Published

Refactored API keys, Gatsby V5, Dynamic documentation, and migration support for Redwood self-hosted Auth.

Refactored API keys

We've refactored our API keys to a more familiar format:

  • Publishable key (prefixed with pk_test_ or pk_live_)
  • Secret key (prefixed with sk_test_ or sk_live_)
Quick copy

With this upgrade, we introduced a quick copy in our dashboard for each of our SDKs allowing you to move faster than ever.

What about legacy keys?

Legacy keys are still available in the dashboard and can continue to be used. Once ready to upgrade, you will need to replace all the keys simultaneously, as you cannot mix the legacy keys with the new ones.

But why?

Learn more about the motivation behind our new keys.

Documentation improvements

Developer experience is huge for us here at Clerk, and with that, we want to make it easy to get started and easier to find what you are looking for.

Dynamic documentation

Last week we introduced new environment-driven examples, allowing us to insert your keys into our docs. This is only in our get-started sections, but we want to add it to more places in the near future.

Search improvements

We spent some time improving the search and results that were returned, this has been high on our list this month, and we think the improvement already shows.

t3-turbo-and-clerk

We launched a new starter repo called t3-turbo-and-clerk.

For the launch, we collaborated with t3's creator, Theo Browne, to show off the simplicity of the solution. Check it out:

Gatsby V5

We updated our Gatsby plugin to support Gatsby V5. You can now access the user's authentication state on the client or the server. Below are examples of SSR and API routes:

SSR
/pages/ssr.tsx
import * as React from 'react'
import { GetServerData } from 'gatsby'
import { withServerAuth } from 'gatsby-plugin-clerk/ssr'

export const getServerData: GetServerData<any> = withServerAuth(
  async (props) => {
    return { props: { data: '1', auth: props.auth } }
  },
  { loadUser: true },
)

function SSRPage({ serverData }: any) {
  return (
    <main>
      <h1>SSR Page with Clerk</h1>
      <pre>{JSON.stringify(serverData, null, 2)}</pre>
    </main>
  )
}

export default SSRPage
API Routes
/api/hello.ts
import { clerkClient, withAuth } from 'gatsby-plugin-clerk/api'

interface ContactBody {
  message: string
}

const handler = withAuth(async (req, res) => {
  const users = await clerkClient.users.getUserList()
  res.send({
    title: `We have ${users.length} users`,
    message: req.body.message,
    auth: req.auth,
  })
})

export default handler

Redwood dbAuth migration Support

We now support migrating users and their hashed passwords (using pbkdf2_sha1) from RedwoodJS dbAuth to Clerk using our API.

Migrating for another tool? Contact support to let us know if you need us to add another hashing algorithm.

Node 12 is no longer supported

We have dropped support for Node 12 and will be only supporting Node 14 or higher.

Community Highlights

Brazilian translation

A massive shoutout to Darlan for his first contribution to Clerk by adding a Brazilian translation to our Clerk components.

Contributor
James Perkins

Changelog January 20, 2023

Category
Company
Published

Clerk has gone isomorphic, updated organization details page, and two deprecated packages

Clerk has gone isomorphic

We refactored our SDKs to allow for isomorphism. This means we can offer more V8 runtimes, such as Cloudflare workers.

You can see the new backend package we are using under the hood in our Github Repository

Deprecated Packages

With the changes described above have deprecated two packages as they are no longer needed to run server-side requests:

@clerk/backend-core
@clerk/edge

Organization details update

The organization details page in the dashboard has been updated to be easier to manage your organization. You can now:

  • Change the organization name
  • Update membership limits
  • Add or update public or private metadata
  • Delete unused organization

How to stay up to date with Clerk?

The best way to keep up with Clerk is to subscribe to our newsletter. We send out updates every week. Updates include new features, what we have been working on, and blog posts you may have missed!

Clerk Community Discord

Clerk has a community Discord. When you join, you will find a place:

  • Find the latest Clerk news and announcements
  • Share your project with the Clerk community, and talk about your experience
  • Request features and gets help integrating Clerk from the team and community.

Clerk Twitter

Our Twitter account (@clerkdev) announces the latest features and improvements. We would also be psyched if you tagged us in projects you have built.

Contributor
James Perkins

Changelog December 23, 2022

Category
Company
Published

New backend API reference documentation, useAuth improvements and Italian language support

New Backend API reference docs

We created new backend API reference documentation that is automatically updated when we release any changes to Production based on the OpenAPI specification.

This upgrade shows successful and unsuccessful payloads and what to expect from a type. It can also run a test request in the browser, allowing you to see a request and response using your API key.

Check it out at https://clerk.com/docs/reference/backend-api

Thanks to the contributors: Mark Pitsilos, James Perkins

useAuth improvements

The useAuth hook now contains orgId, orgSlug, orgRole allowing you to access organization data when you need it on the client.

Italian Language Support

A massive shoutout to nitroin for opening up a pull request into our @clerk/localization package to add Italian translations to all our components.

import { itIT } from '@clerk/localizations'

const App = () => {
  return <ClerkProvider localization={itIT}>{/* ... */}</ClerkProvider>
}

Bug fixes and Performance improvements

We fixed a few bugs this week that are important to highlight.

Apple OAuth User name

We now return the user name from a sign in when using Apple as the OAuth provider.

Respect JWKS cache

We fixed a bug in our Ruby SDK, which now respects the JWKS cache specified.

Performance improvements to users endpoint

We have improved the performance of the /api/users/ endpoint, you should already notice the difference!

How to stay up to date with Clerk?

The best way to keep up with Clerk is to subscribe to our newsletter. We send out updates every week. Updates include new features, what we have been working on, and blog posts you may have missed!

Clerk Community Discord

Clerk has a community Discord. When you join, you will find a place:

  • Find the latest Clerk news and announcements
  • Share your project with the Clerk community, and talk about your experience
  • Request features and gets help integrating Clerk from the team and community.

Clerk Twitter

Our Twitter account (@clerkdev) announces the latest features and improvements. We would also be psyched if you tagged us in projects you have built.

Contributor
James Perkins

Changelog December 16, 2022

Category
Company
Published

No more third-party cookies, pricing updates, and an educational youtube channel.

URL-based session syncing

We have been working on making development no longer require any third-party cookies. This is now out of experimental, and all instances created from now on won't' use them.

Development instances created before December 6, 2022, still communicate to the Clerk frontend API using cookies. You can follow our upgrade guide to migrate to URL-based session syncing.

Thanks to the contributors: Haris Chaniotakis, Agis Anastasopoulos, Nikos Douvlis

Pricing Changes

We updated our pricing and our free plan to serve our users better. You can now have up to 5,000 monthly active users and ten organizations for free with no credit card required.

Our hobby and business plan prices have been reduced to $25 and $99, respectively. We updated our pricing page to make it even easier to figure out what it will cost to run your SaaS.

Thanks to the contributors: Marcel Cruz, Charles Wefso

Launching A YouTube Channel

Clerk is invested in educating people on the modern web alongside authentication and user management. We have launched a dedicated YouTube to cover topics on the modern web and how to use Clerk in complex applications.

Check out the video below on using TRPC and Clerk to create a secure typesafe application. If you are interested in the modern web and Clerk make sure you subscribe.

How to stay up to date with Clerk?

The best way to keep up with Clerk is to subscribe to our newsletter. We send out updates every week. Updates include new features, what we have been working on, and blog posts you may have missed!

Clerk Community Discord

Clerk has a community Discord. When you join, you will find a place:

  • Find the latest Clerk news and announcements
  • Share your project with the Clerk community, and talk about your experience
  • Request features and gets help integrating Clerk from the team and community.

Clerk Twitter

Our Twitter account (@clerkdev) announces the latest features and improvements. We would also be psyched if you tagged us in projects you have built.

Contributor
James Perkins

Changelog December 9, 2022

Category
Company
Published

6.2 million dollars in funding, Support for Cloudflare workers, Localization improvements, Invite your team to Clerk and new social logins

$6.2m new funding, led by a16z

On November 30th, we announced $6.2m in new funding led by Martin Casado at Andreessen Horowitz, with continued participation from S28 Capital, Fathom Capital, and South Park Commons. This funding marks a significant milestone for Clerk. For the first time, we've raised based on the traction of our customers, who are simply blowing us away with their continued success.

You can read the full blog post from our CEO Colin.

Support for Cloudflare workers

With the latest release of @clerk/remix we can now support Cloudflare workers, Cloudflare pages, Node, and Deno. This was a long-requested feature, and we are glad we can start supporting the runtime of your choice. To learn how to use experimental support, check out the documentation.

Localization improvements

@clerk/localizations

We introduced a new open-source package this week called @clerk/localizations that allows you to import a language and use it in our components. If you have translated your Clerk components into another language, feel free to open a PR and hope the Clerk community.

import { ClerkProvider } from '@clerk/nextjs'
import { frFR } from '@clerk/localizations'

function MyApp({ Component, pageProps }) {
  return (
    <ClerkProvider localization={frFR} {...pageProps}>
      <Component {...pageProps} />
    </ClerkProvider>
  )
}

export default MyApp

Datetime localization

As part of our localization effort, we also introduced Datetime localization, allowing you to present your user with the correct format based on their location. For example:

dates: {
  previous6Days: "{{ date | weekday('fr-FR','long') | titleize }} dernier à {{ date | timeString('fr-FR') }}",
},

Thanks to the contributors: Nikos Douvlis, Stefanos Anagnostou

Invite your team

The Clerk dashboard now supports organizations in the Dashboard, allowing you to invite team members who need access to the admin panel with a single click. We also give you a personal workspace for all those side projects you've been thinking of.

If you already have an application in your Dashboard that isn't attached to an organization but needs to be transferred, with a few clicks, you can transfer the ownership.

Sign in with Xero and Box.

We now support Box and Xero for social logins bringing our total to 20 supported providers! Check out our integration documentation if you are interested in Box or Xero.

Community shoutout

A massive shoutout to our Discord member David who created a Terraform module that allows hook up your Clerk instance to AWS.

How to keep up to date with Clerk?

The best way to keep up with Clerk is to subscribe to our newsletter. We send out updates every week. Updates include new features, what we have been working on, and blog posts you may have missed!

Clerk Community Discord

Clerk has a community Discord. When you join, you will find a place:

  • Find the latest Clerk news and announcements
  • Share your project with the Clerk community, and talk about your experience
  • Request features and gets help integrating Clerk from the team and community.

Clerk Twitter

Our Twitter account (@clerkdev) announces the latest features and improvements. We would also be psyched if you tagged us in projects you have built.

Contributor
James Perkins