Override service_role key for local dev #32721
-
Is there a way to override service_role key for local development / CI? I wanted to write some integration tests using deno that don't require setting up the whole edge function environment on CI / localhost. Some of my functions use the service_role key and so I was wondering whether there is a way to override the key for local db OR an easy way to programatically retrieve this key (again, just for local env). Right now I'm doing SERVICE_ROLE_KEY=$(supabase status | grep service_role | cut -d ' ' -f 3) but I think there might be a less hacky way (?) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The key is always the same on local dev. This key doesn't change since it should only be used in local development, you can just hardcode the value in. I leave it in the example |
Beta Was this translation helpful? Give feedback.
The key is always the same on local dev. This key doesn't change since it should only be used in local development, you can just hardcode the value in. I leave it in the example
.env
file for most of my projects as it never changes.