jpsimons
05/06/2022, 4:17 AMx-forwarded-for
(which I believe is supposed to have a comma delimited list of every hop), and for x-real-ip
I get null. In local development is seems to give me a real IP address for x-real-ip. Any way to get the "first" IP address in the chain of requests which is the end user?Studywithdesign
05/06/2022, 9:01 AMsamjmck
05/06/2022, 10:06 AMwith check
and using
for policies?uskolol
05/06/2022, 10:56 AMbatuhanbilginn
05/06/2022, 11:47 AMkaaloo
05/06/2022, 1:16 PMFailed to invite user: Error inviting user
when inviting a user in the dashboard or when signing in in our app. The only thing that has changed since yesterday is a colleague updated some of the templates. Could it be that badly formed HTML in these templates could be causing this?CodeCo
05/06/2022, 7:18 PMsql
SELECT
*,
ROW_NUMBER () OVER (ORDER BY timestamp DESC)
...
emellum
05/06/2022, 11:18 PMbenten
05/07/2022, 1:19 AMdocument_id
in a table that matches the document_type
?dolmios
05/07/2022, 3:34 AMFranck
05/07/2022, 4:02 AMjs
const { data, error } = await supabase.storage.createBucket(`${userId}-bucket`)
Where userId
comes from useAuth()
hook from Clerk.
Although I'm getting the following error on POST:
json
{
error: ""
message: "invalid input syntax for type uuid: \"user_28YHvhguBwY5edeBlB6WrD0pKNE\""
statusCode: "22P02"
}
The payload looks like this:
json
id: "user_28YHvhguBwY5edeBlB6WrD0pKNE-bucket"
name: "user_28YHvhguBwY5edeBlB6WrD0pKNE-bucket"
public: false
Is it a RLS error?cbert
05/07/2022, 7:08 AMikigai
05/07/2022, 1:03 PMregex
05/07/2022, 1:15 PMDatabase error saving new user
what could be the issue that I am missing? What should I look for?kaaloo
05/07/2022, 2:50 PMsupbase start
) has really bad latency (order of 20s per request) when my VPN is on. Everything is normal with the VPN off. See for example the following log entries from kong
where the last one took place with the VPN off. You'll see the 20s delay between the OPTIONS and POST requests. Any ideas?
172.18.0.1 - - [07/May/2022:12:50:27 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
172.18.0.1 - - [07/May/2022:12:50:47 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
172.18.0.1 - - [07/May/2022:13:00:28 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
172.18.0.1 - - [07/May/2022:13:00:48 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
172.18.0.1 - - [07/May/2022:14:35:52 +0000] "OPTIONS /auth/v1/otp HTTP/1.1" 200 0 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
172.18.0.1 - - [07/May/2022:14:35:52 +0000] "POST /auth/v1/otp HTTP/1.1" 200 2 "http://localhost:3000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
flotTopz
05/07/2022, 5:19 PMDanMossa
05/07/2022, 6:06 PMAlbert [tox/cis]
05/07/2022, 9:51 PMis_admin()
which checks a table where I've stored user ids and roles. All it does is pretty much return exists(select * from user_role where "user" = auth.uid() and role = 'admin'
. In flutter, I tested this and it gives me a true value :). Now, I wanted to apply this to row level policies. It's simple: if someone wants to edit a specific table, is_admin()
just needs to return true however, my requests get rejected all the time. Why?scon
05/07/2022, 11:31 PMben
05/08/2022, 2:59 AMNeedle
05/08/2022, 8:27 AMNeedle
05/08/2022, 8:50 AMsamjmck
05/08/2022, 9:13 AMAditya Tripathi
05/08/2022, 9:54 AMNeedle
05/08/2022, 9:56 AMxephyr
05/08/2022, 10:53 AMmaybeSingle()
errors when 0 rows are returned? I thought that was the whole point of it over .single()
I've got a many:many join table called `teams_users`:
ts
id // auto-increment
created_at // NOW()
team_id // foreign key teams.id
user_id // foreign key users.id
When I do the following:
ts
supabase
.from("teams_users")
.select("id")
.match({ team_id, user_id })
.maybeSingle();
I get an 406 Not Acceptable
error:
json
{
"message":"JSON object requested, multiple (or no) rows returned",
"details":"Results contain 0 rows, application/vnd.pgrst.object+json requires 1 row"
}
The docs are pretty barebones atm so difficult to learn from but includes this quote:
> Result must be at most one row (e.g. using eq on a UNIQUE column), otherwise this will result in an error.
The e.g. using eq on a UNIQUE column
strikes me as just an example, can maybeSingle()
ONLY be used after passing a primary key in to .match/.eq
?Needle
05/08/2022, 11:23 AMcannedevil
05/08/2022, 11:25 AMBearer
header. but the Session object have the payload (in the access_token
) just fine?
Have anybody encountered this issue? πjjj.westra
05/08/2022, 11:34 AM