In a previous post, I mentioned tools that we use and inspire us when building Bucket — a modern feature management tool that's purpose-built for B2B SaaS products.
This made me want to create a series featuring our stack — starting with Clerk, a user management platform.
We prioritize craftsmanship. So, when we started building the auth
feature — the first interaction you have with the product — we wanted to make it a great first-time experience.
We wanted you to have a seamless, secure, and beautifully crafted login experience, and we also needed a solution that is easy to maintain and scales with our needs. After evaluating several providers, we ultimately picked Clerk.
Here's why.
TL,DR
- First, we used Google Auth with Passport.js, and faced some limitations.
- We considered multiple options: GCP Identity Platform, WorkOS, Clerk.
- We picked Clerk. Beautiful out-of-the-box, quickly set up, and scalable — a no-brainer.
The need for a new auth provider
Initially, we were using Google Auth with Passport.js to handle authentication. While this setup worked, it had some limitations:
- Passport.js is unmaintained – Relying on an outdated auth library wasn’t a sustainable long-term solution.
- We needed user/password authentication – Some users preferred traditional credentials over Google authentication.
- SSO support was becoming essential – As a B2B-focused product, we were looking towards a solution that would make it simple to provide Sign-On (SSO) with SAML.
These needs pushed us to search for a more robust and scalable auth solution.
Evaluating options
We considered several providers, including:
- GCP Identity Platform, Google's Identity Platform — affordable and integrated with other Google Cloud services. However, from our perspective, it lacked some of the developer experience (DX) improvements we were looking for.
- WorkOS – a mature and feature-rich auth provider. However, we didn't feel 100% confident about their pricing structure and their per-connection SAML costs in particular.
- Clerk – a "comprehensive user management platform" with a developer-friendly approach, beautiful pre-built UI components, and a strong vision that goes beyond just auth.
These three options supported core authentication features like SSO and SAML, and Clerk ultimately won us over.
Why Clerk?
TL,DR:
1. Quick setup
Above all, one advantage of Clerk was its simple setup.
We were able to integrate Clerk into our platform quickly, without significant friction. Their documentation was clear, and their API made it simple to implement auth without unnecessary complexity.
Here's what it looks like to add Clerk components to a Next.js app:
import type { Metadata } from 'next'
import {
ClerkProvider,
SignInButton,
SignUpButton,
SignedIn,
SignedOut,
UserButton,
} from '@clerk/nextjs'
import { Geist, Geist_Mono } from 'next/font/google'
import './globals.css'
const geistSans = Geist({
variable: '--font-geist-sans',
subsets: ['latin'],
})
const geistMono = Geist_Mono({
variable: '--font-geist-mono',
subsets: ['latin'],
})
export const metadata: Metadata = {
title: 'Clerk Next.js Quickstart',
description: 'Generated by create next app',
}
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<ClerkProvider>
<html lang="en">
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
<header className="flex justify-end items-center p-4 gap-4 h-16">
<SignedOut>
<SignInButton />
<SignUpButton />
</SignedOut>
<SignedIn>
<UserButton />
</SignedIn>
</header>
{children}
</body>
</html>
</ClerkProvider>
)
}
2. Beautiful pre-built components
Clerk offers beautifully crafted UI components that fit seamlessly into Bucket.
As a company that values craftsmanship, having a signup flow that looked good out of the box was key to us. Clerk saves us time and ensures a smooth UX from Day 1.
3. Broader vision
Clerk isn't just about auth.
It also provides user roles and access control, on which we can define permissions and secure different access levels within Bucket. These features are priceless for a B2B SaaS company, and we're super excited about this flexibility as we scale.
4. Reasonable pricing
Their pricing seemed very reasonable to us.
While GCP Identity Platform seems cheaper, Clerk balances affordability and functionality. And we didn't have to worry about unexpected pricing jumps as we onboard more SSO/SAML customers.
5. Responsive support
Last but not least, during our implementation, we ran into some issues, and their support team replied fast, helping us resolve them quickly — S/O to @brianmmdev and team!
Final thoughts
Switching to Clerk has been a great decision for us. Beautiful out-of-the-box, quickly set up, and scalable — it's a no-brainer, and a source of inspiration for us at Bucket.
We're building a feature management tool for B2B SaaS products based on these exact first principles: craftsmanship, developer-first, and scalability.
If you're into it, go to bucket.co, give it a spin, and let us know what you think @bucketdotco on X.
We'd love to have your feedback!
Top comments (3)
Thanks for the shout out!
thanks, Brian! really happy with the product. keep up your great work!
Very interesting post about "open source auth solutions". How was the experience is it covered all the gaps you had before? Is it felt mature and production ready?