nimo
02/10/2023, 4:25 AMEhh
02/10/2023, 4:35 AMNET::ERR_CERT_AUTHORITY_INVALID
error.
My project was paused on supabase due to inactivity the last couple of weeks but after reactivating it a couple of minutes ago I still get this error.
Here's my project: https://habits-psi.vercel.app/
Error occurs when clicking on Sign in with Github
button
Anyone know what to do?darick
02/10/2023, 6:51 AMdarick
02/10/2023, 7:17 AMdante
02/10/2023, 7:39 AMjfbn
02/10/2023, 9:25 AMjs
const signupResult = await supabaseClient.auth.signUp({
email,
password,
options: {
data: {
username
}
}
});
I am trying to create a function that will take this username
when the user signs up, and add the value to the users corresponding row in my profiles
table.
I don't understand how I can access the json data in the function. Anytime I try to search up the syntax I see only regular SQL select statements, but in this case I am not select
-ing the json from an existing row, but rather trying to retrieve it through the new
variable that's available to me in my function.
As far as I understand, the new
keyword represents the new entry, which is where I expect this JSON object to exist
I also tried this approach but it's not working either:
declare
username varchar(50);
begin
select raw_user_meta_data ->> "username" from auth.users where id = new.user_id into username;
insert into public.profiles(user_id, username)
values(new.id, username);
return new;
end;
sinrabo
02/10/2023, 10:33 AMyngwi
02/10/2023, 11:39 AMsupabase functions serve
command of the cli on windows, it doesn't seem to be watching changes. Is this a known problem or is there a workaround or a fix that I can apply on my side? Thank you!matheusbn
02/10/2023, 1:21 PMjonask
02/10/2023, 3:23 PMCheqo
02/10/2023, 4:12 PMKremBanan
02/10/2023, 5:15 PMfrom("foo").select(...)
only gives me the type "*" in vscode, does it not know all my table columns?Hugos
02/10/2023, 5:36 PMChez
02/10/2023, 6:14 PMimages/${image}
])
I checked my storage policies, they allow CRUD operations for all users (not secure I know). I'm called an async function which gets the image src and deletes the image from storage. Not sure what I'm doing wrong.Jimson
02/10/2023, 8:25 PMcreate policy "view your own stuff"
on my_table for select
using ( auth.uid() = created_by );
Even if I just change the policy to true
I get no results back.
As soon as I disable RLS for the table I do get all results back. Can't figure out what I am doing wrong? I'm using SvelteKit and doing this in a page.server.js fileCalsyfur
02/10/2023, 9:09 PMhttp
{
"message": "FetchError: error sending request for url (http://localhost:54321/rest/v1/reactions?select=*): error trying to connect: tcp connect error: Cannot assign requested address (os error 99)",
"details": "",
"hint": "",
"code": ""
}
Code: js
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { createClient, SupabaseClient } from 'https://esm.sh/@supabase/supabase-js@2'
serve(async (req) => {
const { url, method } = req
try {
const SUPABASE_URL = 'http://localhost:54321'
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0'
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY)
const { data, error } = await supabase.from('reactions').select()
if (error) {
return new Response(JSON.stringify(error), {
status: 500
})
}
return new Response(
JSON.stringify(data),
{ headers: { "Content-Type": "application/json" } },
)
} catch (error) {
console.error(error)
return new Response(JSON.stringify({ error: error.message }), {
headers: { 'Content-Type': 'application/json' },
status: 400,
})
}
})
Hugos
02/10/2023, 9:23 PMjt
02/10/2023, 9:35 PMDDupasquier
02/10/2023, 9:51 PMhtml
<div style="width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center">
<img title="pinchedparables" alt="logo" src="https://www.pinchedparables.com/_app/immutable/assets/craibpath-985b930b.svg">
<h2>Magic Link from Pinched Parables!!!</h2>
<h3>Thanks for visiting!</h3>
<p>Follow this link to login:</p>
<p><a href="{{ .ConfirmationURL }}">Log In</a></p>
</div>
martinbot
02/10/2023, 9:53 PMAergis
02/10/2023, 11:17 PMTheodore
02/10/2023, 11:38 PMconst footerButtonID = await supabase
.from("components_layout_footers_components")
.select("id")
.eq("field", "Button")
.single();
const Button = await supabase.from("components_buttons_buttons").select().eq("id", footerButtonID.data.id).single();
alana
02/11/2023, 12:36 AMDYELbrah
02/11/2023, 1:07 AM?????
02/11/2023, 1:07 AMUnknown Member
02/11/2023, 1:49 AMnuotsu
02/11/2023, 1:58 AMTradeUpCards
02/11/2023, 2:15 AM{
"message": "An invalid response was received from the upstream server"
}
dogedogego
02/11/2023, 5:15 AMauthenticated
role or service-role
for the target roles in the RLS?dogedogego
02/11/2023, 5:24 AM