Clerk
Blog

Back

Company


Jan 27, 2023

Back

Company


Jan 27, 2023

Changelog January 27, 2023

James Perkins

James Perkins


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

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
1
import * as React from 'react';
2
import { GetServerData } from 'gatsby';
3
import { withServerAuth } from 'gatsby-plugin-clerk/ssr';
4
5
export const getServerData: GetServerData<any> = withServerAuth(
6
async props => {
7
return { props: { data: '1', auth: props.auth } };
8
},
9
{ loadUser: true },
10
);
11
12
function SSRPage({ serverData }: any) {
13
return (
14
<main>
15
<h1>SSR Page with Clerk</h1>
16
<pre>{JSON.stringify(serverData, null, 2)}</pre>
17
</main>
18
);
19
}
20
21
export default SSRPage;

API Routes

/api/hello.ts
1
import { clerkClient, withAuth } from 'gatsby-plugin-clerk/api';
2
3
interface ContactBody {
4
message: string;
5
}
6
7
const handler = withAuth(async (req, res) => {
8
const users = await clerkClient.users.getUserList();
9
res.send({ title: `We have ${users.length} users`, message: req.body.message, auth: req.auth });
10
});
11
12
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.

Clerk's logo

Start now,
no strings attached

Start completely free for up to 5,000 monthly active users and up to 10 monthly active orgs. No credit card required.

Start Building

Pricing built for
businesses of all sizes.

Learn more about our transparent per-user costs to estimate how much your company could save by implementing Clerk.

View pricing
Clerk's logo

Newsletter!

The latest news and updates from Clerk, sent to your inbox.

Clerk logo

Clerk - Complete User Management

TwitterLinkedInGitHubDiscordFacebook

© 2023 Clerk Inc.


product
Components

© 2023 Clerk Inc.