Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain the same service role key for local development #3324

Open
percarlsen opened this issue Mar 19, 2025 · 0 comments
Open

Retain the same service role key for local development #3324

percarlsen opened this issue Mar 19, 2025 · 0 comments

Comments

@percarlsen
Copy link

Is your feature request related to a problem? Please describe.
Supabase webhooks do not work well across environments because the URL is retained. In order to bypass this, I'm storing the url and service role key in the vault and have created a custom function that calls the edge function using the url and service role key from the vault. (See this post for details if interested: https://stackoverflow.com/a/78900192)

This works fine in production and staging, but I've come across a problem for my local development environment. The service role key seems to be re-generated when running supabase start, meaning that I won't have the same service role key as the other devs in the team. This is cumbersome because each dev now has to either maintain their own key in the config file ([db.vault]) or in the seed file (both of which are tracked by git). I also have to change it whenever re-starting supabase.

Describe the solution you'd like
Make it possible to keep the same service role key for local dev. For example pass it as a flag to supabase start or store it in an .env file.

Describe alternatives you've considered
Currently bypassing this by disabling jwt when running edge functions locally (as this is currently my only use-case for having the service role key in the vault).

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant