fred kufner
05/10/2023, 5:52 PMhemantgangolia
05/10/2023, 5:56 PMcrimsen
05/10/2023, 5:57 PM${provider}
,
options: {
redirectTo: ${process.env.NEXT_PUBLIC_APP_URL}/auth/dashboard
,
},
});`Olly
05/10/2023, 6:25 PMMartyn Shiner
05/10/2023, 6:28 PMseeinplays
05/10/2023, 7:28 PMlet { data: user, error } = await supabase
.from('user')
.select('address')
I have the client set up like this
let { data: user, error } = await supabase
.from('user')
.select('address')
is there something I'm missing?osamita
05/10/2023, 7:31 PMbboy
05/10/2023, 7:49 PMRodrigo702
05/10/2023, 7:56 PMhttps://cdn.discordapp.com/attachments/1105946595972890734/1105946596161638500/Screenshot_2023-05-10_at_12.49.30_PM.png▾
vortexbam
05/10/2023, 7:59 PMGoldin
05/10/2023, 8:25 PMroot
05/10/2023, 9:03 PMts
(await supabase.functions.invoke('get-user', { body: JSON.stringify({ uid }) })).data
Sending the same request with Postman works properly.dfasdfghadfhg
05/10/2023, 9:16 PMmkarmstr
05/10/2023, 9:17 PMamitmirgal
05/10/2023, 11:08 PMjs
import { createClient } from "@supabase/supabase-js";
async function addSecrets() {
const supabaseClient = createClient(
"url",
"service_role",
{
db: {
// vault schema is not support.
// only supported schema are public, storage, graphql I think
schema: "vault"
}
}
);
await supabaseClient.from("vault.secrets").insert({
secret: 's3kr3t_k3y',
associated: 'This is the secret API service key.'
});
}
addSecrets()
gilbert
05/10/2023, 11:25 PMgithub.ts
file that is shared across my codebase. I'd like to use this file for an edge function too.
However, the local edge functions runtime cannot find this file. The import looks like this:
import { getRepo } from "../../../shared/github.ts";
Looking at the debug output shows why it fails:
DEBUG FileFetcher::fetch() - specifier: file:///home/deno/functions/_lib/edge-db.ts
DEBUG FileFetcher::fetch() - specifier: file:///home/shared/github.ts
Is there a way to import code outside the supabase/functions
folder? I tried a symlink but it didn't work. ThanksSunTzu
05/10/2023, 11:32 PMJulian IncrEdelman
05/10/2023, 11:54 PMsupabase stop --backup
and then supabase start
.
My migration file (which CAME from the local DB and was run properly in prod) fails with a ton of errors basically because I need to include "public." or "extensions".
That is issue #1.
Issue #2 is after I fix them and run supabase start
my backed up data is GONE. So now I am just screwed. Ugh.Robert Dylina
05/10/2023, 11:54 PMven
05/11/2023, 12:18 AMtorpis
05/11/2023, 1:16 AMhttps://cdn.discordapp.com/attachments/1106027123208101989/1106027123359088740/Screenshot_2023-05-10_201320.png▾
https://cdn.discordapp.com/attachments/1106027123208101989/1106027123677872208/Screenshot_2023-05-10_201116.png▾
Michael Li
05/11/2023, 1:26 AMraw_app_meta_data
updated, how do i create new access token?goodparson
05/11/2023, 2:55 AMresponse = supabase.table("conversations").update({"rating": 5}).eq("id", 1).execute()
The id field in my "conversations" table is an integer, and I am trying to update the "rating" field for the row with id = 1. However, when I run this code, I receive the following error:
TypeError: argument of type 'int' is not iterable
The error seems to originate from the sanitize_param method in the PostgREST client used by Supabase. I suspect this method is designed to ensure that certain reserved characters are not included in the parameters of the request, but it appears to be expecting all parameters to be iterable, leading to a TypeError when an integer is passed.
Has anyone encountered this issue before or does anyone have suggestions on how to resolve this? I am following the Supabase documentation, so I'm not sure if this is a bug in the library or if there is something else I'm missing. Any help would be greatly appreciated!
Thanks in advance!Robert Dylina
05/11/2023, 3:35 AMAmanGotchu
05/11/2023, 3:46 AMexport const supabase = createClient(
process.env.SUPABASE_URL!,
process.env.SUPABASE_ANON_KEY!
);
let response = await supabase.from("prompts").select("*");
I don't get any errors from my response just an empty row of entries. I tested the client config by passing in both invalid urls and anon keys that both result in errors leading me to believe that my configuration is correct, but the response is incorrect..1voy
05/11/2023, 4:04 AMhttps://cdn.discordapp.com/attachments/1106069243180617728/1106069243340005396/Screenshot_2023-05-10_at_11.37.10_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069243667173476/Screenshot_2023-05-10_at_11.44.05_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069243985924106/Screenshot_2023-05-10_at_11.45.16_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069244292112485/Screenshot_2023-05-10_at_11.47.14_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069244556365845/Screenshot_2023-05-10_at_11.47.22_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069244875116575/Screenshot_2023-05-10_at_11.47.41_PM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069245177110538/Screenshot_2023-05-11_at_12.03.39_AM.png▾
https://cdn.discordapp.com/attachments/1106069243180617728/1106069245546221568/Screenshot_2023-05-11_at_12.03.57_AM.png▾
KBar
05/11/2023, 6:39 AMnew row violates row-level security policy for table "objects"
error until I added policies for INSERT
& DELETE
.
Now, uploads fail with a 404 status despite the fact that the bucket exists. Here's part of the code that handles the upload process:
jsx
if (img) {
let { data, error } = await supabase.storage.from("public/images").upload(
`${user.id}_${Date.now()}`,
img
);
if (error) console.error(error);
if (data) console.dir(data);
}
Responses have 400 status but the body contains the following JSON:
json
{"statusCode":"404","error":"Not found","message":"The resource was not found"}
What's going on here?Pontus Berglund
05/11/2023, 7:17 AMhiroshi nishio
05/11/2023, 8:03 AMApe R Us
05/11/2023, 8:24 AMhost=db.***.supabase.co user=postgres database=postgres`: failed SASL auth (FATAL: SASL authentication failed (SQLSTATE 08P01))