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}`
            }
          }
        }
      : {}
  )
}


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.
Was this page helpful?