Supabase is an open source Firebase alternative
Questions tagged [supabase-js]
74 questions
0
votes
1 answer
Supabase Session Null/Undefined Even After Successful Authentication
I have an Express server that right now signs into Supabase. The authentication is successful as when I print data it gives me the user and session information. But when I try to retrieve the user or session information, it's just null. In the below…

Ansh
- 1
0
votes
0 answers
Strings Inserted Into Supabase's Encrypted Columns Aren't Stored / Retrieved Correctly
This should be pretty simple, according to the docs...I'm trying to store and retrieve a string in an encrypted column in my Supabase database.
Inserting a string manually via the dashboard works - the string is encrypted and then I can view it in…

Alex S
- 190
- 3
- 15
0
votes
1 answer
react native supabase auth with google redirect issue & no session update
I am a little confused about trying to make a redirect URL to go along with the openAuthSessionAsync in app mobile browser view (docs: https://docs.expo.dev/versions/latest/sdk/webbrowser/#webbrowseropenauthsessionasyncurl-redirecturl-options).
…

Phil Lucks
- 2,704
- 6
- 31
- 57
0
votes
1 answer
Supabase function doesn't do any calculations
I have a function:
begin
if pg_trigger_depth() <> 1 then
return new;
end if;
new.rating = ROUND((new.total_score / new.total_reviews), 1);
return new;
end;
This function must update column rating in table route every time I…

Scheffio
- 25
- 7
0
votes
0 answers
Implementing memory in SupabaseVectorStore with metadata in JavaScript and Langchain
So, previously I was adding docs in my supabase database using this function and it is working just fine. You can see I have to modify the document to add another column (metadata)
async function generateEmbeddings(text, email) {
const…

fishmeisterFTW
- 15
- 4
0
votes
1 answer
new row violates row-level security policy for table "stories"
I am writing a script to scrap data from web and insert data into DB as an Admin. I want a user with specific email only should be able to insert any new record in the table.
const { data, error } = await supabase.auth.signInWithPassword({ // Sign…

Piyush Chauhan
- 797
- 1
- 7
- 20
0
votes
1 answer
FUZZYSTRMATCH extension in the Javascript library
I'm pretty new to Supabase and Postgresql as a whole. I'm attempting to add some sort of fuzzy searching ability within a table for example a list of tags that might include "Business" should be returned for a query of "Bus" or "Busness".
I have…

Kieran Crown
- 307
- 5
- 16
0
votes
2 answers
How do I access supabase authentication generated access token?
I am using Next.js 13 and Supabase v2. I have generated an access token fine, the problem it is unreadable or inaccessible due to the fact that the automatically generated access token is not set to the domain "localhost".
Sharing my screenshot for…

Gavi Salcedo
- 9
- 1
- 5
0
votes
1 answer
Supabase Update which subtracts from numeric field
Using a Supabase database, I'm have having an issue with subtracting from a quantity total which exists in the database field. here is my code:
const { data, error } = await supabase
.from('product')
.update({ quantity: `quantity -…

Jake Anderson
- 309
- 1
- 4
- 18
0
votes
1 answer
Error: "Load failed" trying to upload images to supabase
In my next.js app I am trying to upload image from form. But I keep getting an error:
[Error] Unhandled Promise Rejection: TypeError: Load failed
And the file doesn't upload to supabase.
I checked the image variable via console, it is a File…

Даниэль Сеидов
- 99
- 1
- 12
0
votes
1 answer
Supabase JavaScript data fetching with nested select
I am new to supabase and data fetching via supabase-js client.
When I have the tables below and I have to fetch votes and additionally data from the result and club table, how does this work? Respectively is it possible to have nested selects?…

Philipp
- 794
- 1
- 7
- 21
0
votes
1 answer
User data is unavailable with useUser in useEffect hook
I'm trying to use the useUser hook from Supabase to fetch the user and then construct a query using the user id but the first time the page loads, I get a runtime error:
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading…

David Stevens
- 835
- 1
- 6
- 15
0
votes
2 answers
Supabase security with JWT token
I am still new with supabase. I am little concern of the security.
Now I have a react app and with the anon public API keys I can query the database CRUD.
When I navigate to the db table editor, it prompted me "WARNING : This table is publicly…

Alvin
- 8,219
- 25
- 96
- 177
-1
votes
1 answer
upload file on supabase using appsmith corrupt image
I'm trying to upload an image on supabase storage with appsmith and the file picker option.
It work but my file is corrupt and i don't know why.
export default {
function: async () => {
const sup = JSObject1.client //is the supabase-js client
…

psemsari
- 1
- 2