Shelby
10/01/2022, 7:20 AMThoth Trismegistus
10/01/2022, 7:58 AMCory
10/01/2022, 8:12 AMCanRau
10/01/2022, 1:06 PMauth.users
row to json stripping away sensitive data.
Using just row_to_json
within the trigger function works perfectly fine.
It would just make things "cleaner" and I'd especially like to understand why I don't get it working 😅
Following a few versions I tried, probably not all versions, though all error trying them in the Dashboards SQL Editor
sql
CREATE FUNCTION safe_json(_row json)
RETURNS json
AS $$
BEGIN
RETURN row_to_json(_row)::jsonb-ARRAY['encrypted_password', 'confirmation_token', 'recovery_token', 'phone_change_token', 'email_change_token_new', 'reauthentication_token', 'email_change_token_current'];
END;
$$ LANGUAGE plpgsql;
sql
CREATE OR REPLACE FUNCTION safe_auth_json(_row auth.users)
RETURNS json
AS $$
SELECT row_to_json(_row)::jsonb-ARRAY['encrypted_password', 'confirmation_token', 'recovery_token', 'phone_change_token', 'email_change_token_new', 'reauthentication_token', 'email_change_token_current'];
$$ LANGUAGE sql;
sql
CREATE OR REPLACE FUNCTION safe_auth_json(_row auth.users)
RETURNS json
AS $$
SELECT row_to_json(*)::jsonb-ARRAY['encrypted_password', 'confirmation_token', 'recovery_token', 'phone_change_token', 'email_change_token_new', 'reauthentication_token', 'email_change_token_current'] FROM _row;
$$ LANGUAGE sql;
sql
CREATE OR REPLACE FUNCTION safe_auth_json(_row auth.users)
RETURNS json
AS $$
SELECT row_to_json(_row)::jsonb-ARRAY['encrypted_password', 'confirmation_token', 'recovery_token', 'phone_change_token', 'email_change_token_new', 'reauthentication_token', 'email_change_token_current'];
$$ LANGUAGE sql;
HunterAndersonX
10/01/2022, 1:15 PM.insert(payload)
as well as .upsert(payload, {ignoreDuplicates: true})
and both had the same issue...
I'm using supabase-js (with Next.js)ixxie
10/01/2022, 1:58 PMfilter
argument described in the guide page [1] would seem to follow the syntax of the .or
filter [2] but in the API reference for RC2 it seems to reference the event
argument instead.
Can you confirm the correct syntax for the this parameter?
[1] https://supabase.com/docs/guides/realtime/postgres-changes
[2] https://supabase.com/docs/reference/javascript/next/or
[3] https://supabase.com/docs/reference/javascript/next/subscribeThoth Trismegistus
10/01/2022, 2:19 PMHeitor Ramon (Vue Storefront)
10/01/2022, 2:53 PMFetchError: Request with GET/HEAD method cannot have body
My code:
js
await DiscordMessage.select(baseCols, {
count: 'exact',
}).gte('created_at', (() => startOfToday().toISOString())());
I dont know why this is happening :/Denis_
10/01/2022, 8:17 PMKornel
10/01/2022, 9:31 PMauth.uid()
and auth.email()
inside my PostgreSQL functions like over a week ago. That's how I wrote my delete_user
which I use with .rpc()
from code:
sql
begin
raise log 'auth.uid(): %', auth.uid();
delete from auth.users where id = auth.uid();
end;
But now I noticed I can't delete my users anymore and I can see from logs the reason is that auth.uid()
returns me <NULL>
. It doesn't matter whether I do SECURITY DEFINER
or SECURITY INVOKER
for my func.
auth.email()
doesn't work as well.
Did something happen over this week?bennypc
10/01/2022, 10:59 PMoski啦
10/01/2022, 11:07 PMkavla
10/01/2022, 11:11 PMupdate impacts too many records
when I try to trigger a mutation that changes multiple rows. I know I've got to be holding it wrong. What am I missing here? Both senderId and recipientId are definitely set correctly
mutation RequestAllTools($senderId: UUID!, $recipientId: UUID!) {
updateToolsV2Collection(
filter: { state: { eq: "ACTIVE" }, senderId: { eq: $senderId } }
set: { state: "REQUESTED", recipientId: $recipientId }
) {
__typename
}
}
user8923
10/01/2022, 11:54 PMconst response = await supabase
.from<Task>("tasks")
.select("*");
I get a "No overload expects 1 type arguments, but overloads do exist that expect either 0 or 2 type arguments." error.
I can't figure out what it's expecting as a second generic type parameter. Thanks!konga
10/02/2022, 1:44 AMHomemadesteam58
10/02/2022, 2:03 AMtimmy
10/02/2022, 6:54 AMNanoBit
10/02/2022, 8:22 AMsilentworks
10/02/2022, 12:42 PM매튜
10/02/2022, 9:23 AMsemipiccolo
10/02/2022, 10:34 AMVWL Tobias Hassebrock
10/02/2022, 11:10 AMSebb
10/02/2022, 11:25 AMfrom.remove()
. Thanks in advance!rlee128
10/02/2022, 2:59 PMtimmy
10/02/2022, 4:42 PMgetPublicUrl()
video of issue attachedVik
10/02/2022, 5:57 PMoptions
to the signInWithOtp
function, instead of getting a OTP email I got a confirm email link. Is this currently not possible in V2?
const handleSignIn = async (email: string) => {
setLoading(true);
const { error } = await supabase.auth.signInWithOtp({
email: email,
options: {
data: {
onboarded: false,
},
},
});
michmich112
10/02/2022, 6:44 PMJulien
10/02/2022, 9:14 PMzander
10/02/2022, 9:35 PMbesimon
10/02/2022, 10:42 PM"Error in $: string at 'name=Updated'"