gorbypark
07/25/2022, 3:01 PMcaffeinum
07/25/2022, 3:22 PMashmit
07/25/2022, 3:46 PMmathewcst
07/25/2022, 4:37 PMrlee128
07/25/2022, 6:52 PMgesusc
07/25/2022, 7:54 PMprofiles
table (which I believe I lifted straight from the Supabase docs) that is preventing me from inserting into the table and I have no idea why. The profiles
table has an id
column for the primary key and the policy is below:
create policy "Users can insert their own profile."
on profiles for insert
with check ( auth.uid() = id );
When I run this.#supabase.from('profiles').insert()
as an authenticated user I get new row violates row-level security policy for table \"profiles\"
.chillydog
07/25/2022, 8:19 PMGianni
07/25/2022, 8:53 PMJulien
07/25/2022, 8:59 PMts
return this.supabaseService.supabase
.from('playground')
.select(`
*,
playground_contact_person(
person
),
playground_contact_organization(
organization
)
`)
.or(`creative_organization.eq.${this.userService.userOrganizationId}`)
.or(`person.eq.${this.userService.userProfile.id}`, { foreignTable: "playground_contact_person"})
.or(`organization.eq.${this.userService.userOrganizationId}`, { foreignTable: "playground_contact_organization"})
But this doesn't give the expected result.
I suppose that I'm doing a bad joining but also I think that I should only have one ``or`` statement? But if I should have only one ``or`` statement, how can I filter on multiple foreign table?Needle
07/26/2022, 12:31 AMnickbook777
07/26/2022, 12:38 AMFestiveLlama
07/26/2022, 1:44 AMNeedle
07/26/2022, 7:37 AMknajjars
07/26/2022, 7:47 AMconsole.log
console.warn
console.error
and console.info
supposed to work with suapabase functions? logs from methods other than console.log
do not seem to be visible in the functions logs in supabaseWaldemar
07/26/2022, 8:38 AMload
function (which I've read will be deprecated).
I like the SvelteKit Page Endpoints idea and from what I understood they run server-side and will also work with Vercel, which converts them to Serverless Functions.
Questions:
1) For my config / deployment / hosting scenario, can I just use Supabase Auth (with RLS) in Page Endpoints (or any Endpoints), or do I need something like the auth-helper for SvelteKit (thanks for @silentworks for mentioning it), to pass on the user auth data / session to the "server-side" (endpoints), where the Supabase JS client will fetch data from the DB?
2) If I want to avoid using any additional utils / packages like this auth-helper, or coding something around auth in SvelteKit (hooks, session etc.) at all, and want to use Supabase JS client "out of the box", what are my options? Only to use it client-side (e.g. in onMount
...)?
Naturally UX and security are most important to me, so if I need to do some extra coding, that's not a problem, but I want to understand this whole shebang and add/code only what is really necessary for our project.
Any guidance on the above will be greatly appreciated!Evjen
07/26/2022, 11:00 AMrenderlux
07/26/2022, 12:26 PMReact noob
07/26/2022, 12:48 PMtubbo
07/26/2022, 2:52 PMsupabase db branch [list|create|delete|switch]
, but i couldn't find any more information on what this feature is. can anyone here point me in the right direction for some long-form docs on how database branching works? if this is what i think it is, it could be the Holy Grail of production/development data 😄cyborg31
07/26/2022, 3:12 PMYou must provide either an email, phone number, a third-party provider or OpenID Connect.
Can someone please point me into the right direction what I am doing wrong? I'm sending email and pw and have not found any setting I could change within supabase to solve this (using supabase cloud, not on-prem).Molimat
07/26/2022, 3:27 PMknoppoly
07/26/2022, 3:39 PMAudrow
07/26/2022, 3:42 PMseed.sql
file in my supabase directory that gets run when I reset the database using the Supabase CLI (local development). That seed file does something like this:
sql
DO $$
DECLARE user_1_id uuid;
DECLARE user_2_id uuid;
BEGIN
user_1_id := uuid_generate_v4();
user_2_id := uuid_generate_v4();
INSERT INTO auth.users (id, email, created_at, updated_at)
VALUES
(user_1_id, 'audrow@hey.com', now(), now()),
(user_2_id, 'not-audrow@hey.com', now(), now());
-- use user_1_id and user_2_id in other tables
$$;
With this setup, I see the two users in my database, but I cannot login with them (I get a generic database error) and cannot email them a login link or reset their password.
I think that I can probably do what I want with a JS script that uses my Supabase client, but don't know how to use a JS file to seed the database automatically each time I reset the database.Hoely
07/26/2022, 4:16 PMlaznic
07/26/2022, 4:54 PMHussein Kizz
07/26/2022, 4:59 PMDevThoughts
07/26/2022, 5:30 PMcaesarp
07/26/2022, 5:52 PMstevharve
07/26/2022, 6:30 PMKetch
07/26/2022, 7:22 PM