Christopher30
Christopher303w ago

Working with Supabase & Buildship

On V2 we need to provide API key (as secret) for connecting to Supabase. However, if you are using RLS (as you should) you won't be able to do anything with your database. I tried to add service role API key instead, but it didn't work (service role should bypass the RLS). Any suggestions what could be solution here? P.S. I know there are nodes with user tokens, but in this case, workflow would not be triggered by an authenticated user.
2 Replies
AI Support
AI Support3w ago
AI Support Bot Information
<@750455891878215831> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support3w ago
AI Response
It seems that the uploaded files did not contain specific information about handling Supabase's service role for bypassing Row Level Security (RLS) issues when using BuildShip. To address the situation where the service role API key is not working as expected, here are some general suggestions: 1. Verify Service Role Key: Double-check that the service role API key you are using is correct and that it has not been revoked or regenerated. 2. Check RLS Policies: Ensure that the Row Level Security (RLS) policies allow the service role to bypass checks. You may need to set the appropriate RLS rules in your Supabase project to grant permission explicitly for the actions you are attempting to perform. 3. Supabase Configuration: Confirm that your Supabase configuration allows the service role to bypass RLS restrictions by setting appropriate configurations within your Supabase project. 4. Use Supabase Edge Functions: If the issue persists, consider using Supabase Edge Functions for more complex logic that may require bypassing RLS. 5. Contact Support: If none of the above solutions work, consider reaching out to Supabase support or checking their documentation for further guidance on using service role keys with RLS. If you are looking for a specific approach regarding BuildShip, you might need to submit a support request directly through the BuildShip support channels, as the current resources don't contain a detailed explanation for this issue within BuildShip's integration with Supabase. For any additional guidance, you may also check the Supabase documentation or community forums.
BuildShip AI Support