© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
1 reply
Standaa

Set or Update branch JWT_SECRET

Hello,
I am deploying a branch in a github action.

I use Clerk with jwt templates.
When a query is made to upload a file in my client, clerk signs the jwt with the jwt secret from supase:

export function createSupabaseClient(accessToken?: string) {
  return createClient(
    supabaseUrl,
    supabaseKey,
    accessToken
      ? {
          global: {
            headers: {
              authorization: `Bearer ${accessToken}`
            }
          }
        }
      : {}
  )
}
export function createSupabaseClient(accessToken?: string) {
  return createClient(
    supabaseUrl,
    supabaseKey,
    accessToken
      ? {
          global: {
            headers: {
              authorization: `Bearer ${accessToken}`
            }
          }
        }
      : {}
  )
}


accessToken
accessToken
is the jwt here. Supabase key is the SUPABASE_ANON_KEY

My problem is that when I am spinning up a branch from my supabase staging in CI, a jwt secret is automatically created by supabase.
I want to reuse my clerk staging instance for previews and therefore would like my branch to reuse the parent (main) branch jwt secret (i.e my staging jwt secret).

How can I update or set a jwt secret in code for a branch?

Thank you.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JWT secret format?
SupabaseSSupabase / help-and-questions
17mo ago
HOW TO USE JWT SECRET
SupabaseSSupabase / help-and-questions
5mo ago
How to generate JWT_SECRET?
SupabaseSSupabase / help-and-questions
4y ago
Custom JWT Secret (from Firebase)
SupabaseSSupabase / help-and-questions
4y ago