(no title)
billllll | 1 year ago
Taking a look at the docs here:
https://postgrest.org/en/v12/references/auth.html
https://postgrest.org/en/v12/explanations/db_authz.html
It doesn't seem like current_user_id() is a provided function, and the docs claim nothing else is done with the JWT except validating it. It looks like your claim already includes user_id, so you'd have to get it from the claim using:
current_setting('request.jwt.claims', true)::json->>'user_id';
Not sure if I'm missing something.
cryptonector|1 year ago
radimm|1 year ago
radimm|1 year ago