Skip to main content

Clerk Changelog

Ruby Backend SDK 4.0

Category
SDK
Published

With expanded support for Rails, Rails API, Sinatra, Rack and more

We're excited to announce the release of the Clerk Ruby Backend SDK 4.0! Below is a quick preview of the major changes that we've made.

First-Class Framework Support

In the past, outside of the standard Rails configuration, you had to create your own adapters and helpers to work with Clerk. With this release, we've added or expanded on first-class support for Rails, Rails API, Sinatra, and Rack so that everything works out of the box for the most popular frameworks and configurations.

Here's a quick preview of what 4.0 offers:

Standalone SDK Usage
Clerk.configure do |config|
  config.secret_key = 'sk_live_*****'
end

sdk = Clerk::SDK.new
sdk.users.get_user('*****')
Ruby on Rails
class AdminController < ApplicationController
  include Clerk::Authenticatable

  def index
    @user = clerk.user
  end
end
Sinatra
# Sinatra
class App < Sinatra::Base
  register Sinatra::Clerk

  get "/admin" do
    @user = clerk.user
    erb :index, format: :html5
  end
end

OpenAPI

We've also brought the SDK into full alignment with our Backend API thanks to now generating parts of the SDK from our OpenAPI spec.

You can view the full generated documentation on GitHub.

Upgrading

Upgrade your gem by installing version ~> 4.0.0:

Gemfile
gem 'clerk-skd-ruby', '~> 4.0.0', require: 'clerk'

Breaking Changes

Please note that this release contains a number of breaking changes. Please refer to the upgrade guide for more information.

Contributor
Tom Milewski

Easily find organization members on <OrganizationProfile /> by searching for any information related to them.

Our <OrganizationProfile /> component now supports searching across various member details such as email addresses, phone numbers, web3 wallets, usernames, user IDs, and first or last names. The search supports partial matches, making it easier than ever to locate the member you need.

Check it out now on your <OrganizationProfile /> component!

Contributors
Nicolas Lopes
Laura Beatris

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