diff --git a/docs/data-routing/5-examples/24-supabase.md b/docs/data-routing/5-examples/24-supabase.md index 3e7e17b8..1963d2e0 100644 --- a/docs/data-routing/5-examples/24-supabase.md +++ b/docs/data-routing/5-examples/24-supabase.md @@ -11,6 +11,14 @@ real-time subscriptions, authentication, storage, and serverless functions, all managed through a single interface. Supabase provides multiple ways to consume data from Golioth. +The following examples will need credentials from Supabase. Create two +[secrets](/data-routing/secrets) based on the +[Service Role Key](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key). +`$SUPABASE_KEY` should be the the Server Role Key while `$SUPABASE_SERVICE_KEY` +should take the form of 'Bearer +$Service_Role_Key'. For example, if the `Service Role Key` is `12345` than the `$SUPABASE_SERVICE_KEY`should be set to`Bearer +12345`. + The first example is the simplest and uses the [REST API](https://supabase.com/docs/guides/api). Assuming a database named `golioth_pipeline_basic` with the following columns: @@ -22,13 +30,6 @@ Create the following Pipeline: -Create two [secrets](/data-routing/secrets) based on the -[Service Role Key](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key). -`$SUPABASE_KEY` should be the the Server Role Key while `$SUPABASE_SERVICE_KEY` -should take the form of 'Bearer -$Service_Role_Key'. For example, if the `Service Role Key` is `12345` than the `$SUPABASE_SERVICE_KEY`should be set to`Bearer -12345`. - The second example uses [Edge Functions](https://supabase.com/docs/guides/functions). While [Transformers](/data-routing/transformers) can be used to modify data, Edge @@ -44,13 +45,6 @@ Create the following Pipeline: -Reuse or create two [secrets](/data-routing/secrets) based on the -[Service Role Key](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key). -`$SUPABASE_KEY` should be the the Server Role Key while `$SUPABASE_SERVICE_KEY` -should take the form of 'Bearer -$Service_Role_Key'. For example, if the `Service Role Key` is `12345` than the `$SUPABASE_SERVICE_KEY`should be set to`Bearer -12345`. - Create a new Edge Function called `golioth-pipelines` with the following code: ```ts