Ph!l
08/28/2022, 7:32 PMhttps://i.imgur.com/MthfZGc.png▾
emmanuelaina_
08/28/2022, 7:57 PMqria
08/28/2022, 10:33 PMAaron Me
08/29/2022, 12:31 AMimport { supabaseClient
} from "@supabase/auth-helpers-nextjs";
const uploadSiteLogo = async (image, imageName, imageType) => {
const { data, error } = await supabaseClient.storage
.from("site-logos")
.upload(imageName, decode(image), {
cacheControl: "3600",
upsert: true,
contentType: imageType,
});
if (error) {
throw error;
}
const response = { data, error };
return response;
};
Error:
{
statusCode: '401',
error: 'Invalid JWT',
message: 'new row violates row-level security policy for table "objects"'
}
I just moved from supabase-js to auth-helper-nextjs. this function works no problem with supabase-jscbunge3
08/29/2022, 12:36 AMjdgamble555
08/29/2022, 1:44 AMadditionalUserInfo.isNewUser
to test for this.
Thanks,
Jrbkayz
08/29/2022, 2:09 AMTARS
08/29/2022, 9:30 AMbenjaminbialy
08/29/2022, 9:36 AMsuccodanatra
08/29/2022, 11:06 AM.git
with main branch? I'm using NX monorepo and supabase is inside apps/db/supabase, my root folder owns the git info, but to run supabase locally i had to do git init
also inside the apps/db
folder, it looks like it can't traverse upwards to look for a .git folder in parentsscheduledisplay
08/29/2022, 11:12 AMEL OUADI Abdelati
08/29/2022, 11:30 AMoptions const = { redirectTo: window.location.href, queryParams: { force_login: "true" } }
await supabaseWeb.auth.signIn({ provider: "twitter" }, options)
doesn't work even though i added it.
if you want twitter to force login every time you have to pass the force_login parameter with oauth_token when you call oauth/authorize or oauth/authenticate but supabase doesn't.
when i click on the twitter button i got this
https://xxxxxxxxx.supabase.co/auth/v1/authorize?provider=twitter&redirect_to=""&force_login=true
this means that supabase does not add the force_login parameter after getting the oauth_token.
Any help ?Alio
08/29/2022, 1:03 PMuseEffect(() => {
const users = supabaseWeb
.from("users")
.on("*", payload => {
console.log("Change received!", payload)
})
.subscribe()
}, [])
Replication is enabled ✅
Select granted to public ✅
I've also tried to add a policy :
CREATE POLICY "Enable read access for all users"
ON public.users
FOR SELECT USING (
true
);
Supabase: 1.33.3
Prisma: 4.1.1
Remix: 1.6.1
Mac OS Monterey 12.1
kaaloo
08/29/2022, 1:39 PMgaIaxy
08/29/2022, 2:46 PMSanctus
08/29/2022, 4:08 PMpostgres
SELECT location.name
FROM location
JOIN facility
ON location.id = facility.location_id
JOIN facility_category
ON facility_category.id = facility.facility_category_id
WHERE facility_category.name = 'Imaging Center'
So far I have something likke this:
ts
.from('location')
.select('name, facility!inner(*), facility_category(*)')
.eq('facility_category.name', 'Imaging Center')
But I just get the follwing error: "**Could not find a relationship between 'location' and 'facility_category' in the schema cache**", even though the query works fine in the SQL editor.
Also, I'd like to make it distinct, but my understanding is that it is not possible via the API?Juanπ
08/29/2022, 4:46 PMgaIaxy
08/29/2022, 5:17 PMDginio
08/29/2022, 5:32 PMAllxRise
08/29/2022, 5:43 PMdart
I/flutter (10801): FormatException: Unexpected character (at character 1)
I/flutter (10801): Internal Server Error
I/flutter (10801): ^
error.
I'm using hello-world example, I didn't changed anything.DevThoughts
08/29/2022, 6:52 PMnickreed
08/29/2022, 10:58 PMcrypto.subtle.importKey
to actually import the supabase JWT (from API credentials).
I have added my secret as SUPABASE_JWT_SECRET, but I don't know what values to use for the crypto settings (ie the SHA-256 and HMAC strings seem wrong, but I have no clue what would be correct):
import { verify } from "https://deno.land/x/djwt@v2.7/mod.ts";
serve(async (req) => {
const jwt = req.headers.get("Authorization")!.replace("Bearer ", "");
var key = await crypto.subtle.importKey(
"jwk",
Deno.env.get("SUPABASE_JWT_SECRET"),
{ name: "HMAC", hash: "SHA-256" },
true,
["sign", "verify"]
);
const payload = await verify(jwt, key, "HS512");
timeforpoptarts
08/30/2022, 3:04 AMfernandops26
08/30/2022, 4:20 AMaleemrehmtulla
08/30/2022, 4:43 AMd33pu
08/30/2022, 8:16 AMLukas V
08/30/2022, 9:16 AMuid
.
That made my users table look like this screenshot, and I was just wondering, even though joins and everything works, is it ok to have columns id
, username
, stripe_connect_account
with identical values?MATTI
08/30/2022, 10:31 AManderjaska
08/30/2022, 4:26 PMmartypdx
08/30/2022, 4:42 PMgetUser
is now async. Seems like that would be extra handling to prevent apps from rendering without a user, then second rerender once the getUser
call resolves. Any background on this or possibility to included a getUserSync
?