Skip to main content

Clerk Changelog

Stable release of React Router SDK

Category
SDK
Published

The React Router SDK is no longer in beta.

Back in December we announced the Beta release of our React Router SDK, a new official SDK that allows developers to add authentication and authorization into their React Router application in a matter of minutes.

After fixing some bugs and receiving positive feedback on the SDK we're transitioning the React Router SDK from beta to stable. The best part? You can just upgrade! There are no changes between the beta and stable release.

Upgrade your package by installing version ^1.0.0:

npm install @clerk/react-router@latest
Contributor
Lennart Jörgens

Combined sign-in-or-up

Category
Product
Published

Start collecting sign-in and sign-ups within a single flow.

The <SignIn /> component now allows users to sign up if they don't already have an existing account. When attempting a sign-in and no existing account is found, users will be prompted to continue through the flow to create an account, without needing to navigate to a separate route where <SignUp /> is mounted.

The combined flow is a great option when email-based authentication strategies are used, as the sign-in and sign-up flows tend to be very similar.

To start using the combined sign-in-or-up flow, remove your existing <SignUp /> usage, and unset CLERK_SIGN_UP_URL. Your existing <SignIn /> component will now handle sign ups.

While this is the new default behavior, you can opt out of the combined flow by defining your CLERK_SIGN_UP_URL.

For more information, including how to build a dedicated <SignUp /> page, visit the documentation.

Contributors
Dylan Staley
Alex Carpenter
Bryce Kalow

End of Support for Node SDK

Category
SDK
Published

Completing transition period for Clerk Node SDK

Today marks the end of support for @clerk/clerk-sdk-node as previously announced in our October 2024 deprecation notice. While we will no longer maintain this package, we've ensured a smooth transition path for all our users.

What This Means

Contributor
Clerk

C# Backend SDK

Category
SDK
Published

We've released a new backend SDK for C#! Here's a quick overview of its capabilities and some resources to help you get started.

Check out the new server-side C# SDK right here!

With this launch, C# developers can more easily interface with the Clerk Backend API to manage users, organizations, and sessions.

Clerk Backend API call
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.EmailAddresses.GetAsync(emailAddressId: "email_address_id_example");

// handle response

This release also makes it straightforward to authenticate backend requests in ASP.NET, Blazor, and other C# web frameworks:

authenticateRequest in action
using Clerk.BackendAPI.Helpers.Jwks;
using System;
using System.Net.Http;
using System.Threading.Tasks;

public class UserAuthentication
{
    public static async Task<bool> IsSignedInAsync(HttpRequestMessage request)
    {
        var options = new AuthenticateRequestOptions(
            secretKey: Environment.GetEnvironmentVariable("CLERK_SECRET_KEY"),
            authorizedParties: new string[] { "https://example.com" }
        );

        var requestState = await AuthenticateRequest.AuthenticateRequestAsync(request, options);

        return requestState.isSignedIn();
    }
}

You can use NuGet to install the new Clerk.BackendAPI module via dotnet add package Clerk.BackendAPI. To help you from there, we've prepared detailed reference documentation in the SDK's GitHub repository.

Special thanks to Speakeasy for partnering with us on this SDK release 🎉!

Contributor
Jeff Escalante

Official SDK for Vue and Nuxt

Category
SDK
Published

A community SDK gets its graduation day 🎓

We're excited to announce @clerk/vue and @clerk/nuxt, two new official SDKs that allow developers to add authentication and authorization into their Vue and Nuxt applications in a matter of minutes.

Both SDKs come fully equipped with Clerk's UI components, composables, and low-level utilities for your custom flows.

Use Clerk UI components

Clerk's pre-built UI components give you a beautiful, fully-functional user and organization management experience in minutes. Here's an example on how to use the <SignIn /> component in Vue.

pages/sign-in.vue
<script setup>
import { SignIn } from '@clerk/vue'
</script>

<template>
  <SignIn />
</template>

Protect API routes

For Nuxt users, use the auth context to restrict unauthorized access to your API routes.

server/api/me.ts
import { clerkClient } from '@clerk/nuxt/server'

export default eventHandler(async (event) => {
  const { userId } = event.context.auth

  if (!userId) {
    setResponseStatus(event, 401)
    return 'Unauthorized'
  }

  const user = await clerkClient(event).users.getUser(userId)

  return { user }
})

This is only a quick preview of all that @clerk/vue and @clerk/nuxt offer.

For more information on the available APIs and how to get started building Vue and Nuxt applications with Clerk, check out our Vue Quickstart guide and Nuxt Quickstart guide.

We extend our gratitude to all contributors of the previous community SDK for Vue, which served as the foundation for these official releases.

Contributor
Robert Soriano

URL-based active organization sync

Category
SDK
Published

Use an organization slug in your application URL to automatically set the active Clerk organization.

clerkMiddleware() now supports configuration to detect an organization by slug in a request's URL and automatically set that organization as active for the current session. Any client-side logic to handle syncing a session's active organization with the current URL can now be removed!

Try it today

To start using URL-based active organization syncing, see the clerkMiddleware() documentation.

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

Contributors
Izaak Lauer
Robert Soriano
Laura Beatris
Bryce Kalow