I’m using the SupabaseAuthentication and SupabaseDatabase components. And they’re working fine. The login, the registration, etc. Even fetching data from the table is working fine. But the issue is that whenever i try to insert data in a table, it gives me this error: “Supabase Database Error: Secret API key required”.
I enabled RLS on my tables for security enhancement. However, i tried disabling RLS for the specific database that I’m trying to insert data into and I’ve also tried to add specific policies to allow the insertion for verified users. Both of those solutions didn’t work for me.
And if it’s really about the Secret Key or whatever, there’s no field OR block for a secret key ANYWAY. So, I don’t know what to do with it to be honest.
Does anyone know a solution to that? If so, what? If not, is it a bug?
TL;DR
Supabase is ASKING for the SECRET KEY when inserting data. Any solutions?
I’m using the user access token and I have the API key and the url. If i didn’t have them, i wouldn’t be able to fetch the data in tables or login or whatever else. Especially that i have RLS on, so nobody can even view the tables unless they’re authenticated. But it doesn’t let me insert data and it’s weird that it asks for the Secret Key without having any fields or blocks to add it.
No problems.
I have tried that now and nothing changed.
Also, keep in mind that through the same table i can fetch data. So i don’t think that’s the issue.
Just adding something to that, I think best way is to use Web component, as you can see
there’s no refresh token here, of which user won’t be able to refresh token how’s the access token refreshed when session expired?
I don’t think that’s the issue. Although, it might be another issue because i didn’t handle that yet. But i don’t think that that’s what’s causing the request for secret key.
I think that too. But my whole app is dependent on this component now and I’ve wasted a lot of time. Which is what brought me here. I want to figure out whether that’s my problem or a bug. Otherwise, it’ll waste other people’s time too.
I’m 100% sure that block needs to be set, so if you’re telling me you haven’t done it yet, do it!
Even just for the reason that you’ll definitely need it later once we’ve found the issue.