Hello,
When I make the SQL request SELECT auth.id() in the Supabase SQL editor, I get NULL as a result, whereas I’m connected on my Weweb app.
Does someone know why and how to fix it ?
Thanks
Hello,
When I make the SQL request SELECT auth.id() in the Supabase SQL editor, I get NULL as a result, whereas I’m connected on my Weweb app.
Does someone know why and how to fix it ?
Thanks
You need to use impersonation to impersonate the user.
Ah … how do you set up impersonation ?
Thank you very much @Broberto. 2 quick questions : why is it not a default set up ? Should I do it individually for every member ?
I honestly don’t know what you’re doing/trying to achieve with this. I’d need to understand that first to be able to answer. I do 1:1 teaching sessions if you’d like to learn more about Supabase/WeWeb - Consult with Broberto – Broberto
I’m wanted to create a view to display data based on the auth user, but my SQL statement is not working as it looks like Supabase doesn’t recognize the user as authenticated (I thought it was natively handled by Weweb).
And thanks @Broberto, I will try to look for solutions and if I don’t, I’ll book a session
You should put a policy in RLS in order to gate the content if you wanna have only signed in users to select from a view/table.
yep I did this already.
I think my only problem is that I didn’t understand that Supabase editor and databases aren’t displaying data regarding current auth users, like not dynamically. Because after publishing my changes, it’s working, I’m getting the right amonts of turnovers in my view !
Still learning … Thanks @Broberto