Supabase Auth: Bring Your Own Clerk

31 Mar 2025

3 minute read

Today we're expanding our official Third-party Auth integrations to include Clerk.

Third-party Auth allows you to use external Auth providers with the Supabase as a drop-in replacement for Supabase Auth. This modular design is intentional, allowing you to pick and choose features of Supabase. Our platform makes it easy to get started with Postgres and any of your favorite tools.

It was already possible to use Clerk with Supabase, however the previous method was a bit of a hack that required sharing your project's secret and JWT templates from Clerk. We've worked with the Clerk team on the new implementation. Now you can enjoy better security and the same developer experience you've come to expect from Supabase.

To get started with Clerk and Supabase, visit Clerk's Connect with Supabase page.

Register your Clerk domain in the Supabase Dashboard or in the CLI:


_10
[auth.third_party.clerk]
_10
enabled = true
_10
domain = "example.clerk.accounts.dev"

In your JavaScript app all you need to do is write the following code:


_10
import { createClient } from '@supabase/supabase-js'
_10
_10
const SUPABASE_URL = 'https://<supabase-project>.supabase.co'
_10
const SUPABASE_ANON_KEY = '<SUPABASE_ANON_KEY>'
_10
_10
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
_10
accessToken: () => {
_10
return Clerk.session?.getToken()
_10
},
_10
})

Read the docs to set up Flutter and Swift (iOS) applications, and to learn how to use Postgres Row-level Security (RLS) Policies.

Third-Party Auth is now a lot cheaper

One more thing: today we're making Third-party Auth cheaper so that it has pricing parity with Supabase Auth.

You can have up to 50,000 MAU on the Free plan, or 100,000 MAU on the Pro plan and $0.00325 per MAU above that number.

Free PlanPro Plan
Previously50 MAUs included50,000 MAUs included
Now50,000 MAUs included100,000 MAUs included

Get started today

Supabase Auth makes it easy to implement authentication and authorization in your app. We provide client SDKs and API endpoints to help you create and manage users.

Share this article

Build in a weekend, scale to millions