Supabase is an open source Firebase alternative
Questions tagged [supabase-js]
74 questions
0
votes
1 answer
Supabase Sign-Up: Confirmation Email Not Resent for Existing Email Address
I'm working on a sign-up feature using Supabase and I want to provide feedback to the user if they try to sign up with an email that already exists in the system. I found a relevant GitHub discussion thread and opted for the solution provided by…

Vladimirzb
- 87
- 6
0
votes
0 answers
Getting "global is not defined" after configuring supabase
I did everything Supabase gave in the introduction step by step, but when I want to get a log, it says global is not defined.
import { useEffect, useState } from "react";
import { createClient } from "@supabase/supabase-js";
const supabase =…
0
votes
0 answers
Supabase only letting me add text columns
I'm still new to supabase and backend in general so need a bit of guidance. I created a "profiles" table with row level security on the supabase dashboard. I have a function that is triggered when a new user signs up to populate the profile table…

user8930909
- 35
- 8
0
votes
0 answers
Upsert and return all rows with supabase-js
I'm using the supabase js client. I have an array of records I'd like to insert into my table and return. The records must be unique, so if they already exists in the table they should be ignored, but all the records (regardless of whether they…

joudan
- 81
- 5
0
votes
1 answer
How Can I Query User Via JSONB Data In Supabase?
This is a function that I wrote down to communicate with database and query admin users by a property that I call usertag which is unique for each user.
Idk why the function returns null, I mentioned the full error message down.
How can I query…

7Wdev
- 47
- 7
0
votes
0 answers
Supabase `UPDATE requires a WHERE clause`
I try to update a state of some rows in my table game. My table has a foreignkey lobby to the lobby table, that has a name and a hash.
I try the following in TypeScript:
supabaseClient
.from("game")
.update({ state: closedGameState })
…

progNewbie
- 4,362
- 9
- 48
- 107
0
votes
1 answer
Supabase SQL Function: How to fix 'Failed to run sql query: structure of query does not match function result type' SQL error
Supabase user here trying to return a SQL query that groups share sales of a stock by the stock symbol. Essentially the user can make multiple purchases of the same stock for varying amount of shares. On a dashboard page, I want to show that as one…

zaynb06
- 34
- 2
0
votes
1 answer
vercel building error. nextjs and supabase
error on vercel is like this:
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:399:5)
at new URL (node:internal/url:560:13)
at new SupabaseClient (/vercel/path0/.next/server/chunks/591.js:7054:41)
at…
0
votes
0 answers
Vitests: useSupabaseUser is not defined
I have a problem with vitest and Supabase. I use Nuxt3 in my project with @nuxtjs/supabase plugin. In my store I use useSupabaseUser from library.
I want to test component which use this store but when I started my tests I got error: ReferenceError:…

Dominik Grabiec
- 1
- 1
0
votes
0 answers
Password validation in Supabase
I'm using Supabase + NextJS and I would like to password validation when users sign up to my application. I'm using Supabase's AuthUI component, which provides weak validation (it only enforces that a password be >6 characters), and it doesn't look…

cand
- 21
- 1
0
votes
0 answers
500 SupabaseKey required
I'm trying to connect supabase to sveltekit, but I got an Error 500. I have the API key but it's in my .env file. I think, the env didn't read.
//supabaseclient.js
import { createClient } from '@supabase/supabase-js'
import { SUPABASE_KEY } from…
0
votes
0 answers
Supabase policy for only one column
I have a table with articles and there is column "likes" and I need to allow to anyone (public) to INSERT into this column only "likes". How can I write SQL code for this policy that allow users to insert only into specific column? Is it possible?

FelyAnony
- 23
- 2
0
votes
0 answers
Supabase ANON API_KEY JWTs missing sub claim causing 401 error from auth API (https://.supabase.co/auth/v1/user)
I'm using supabase-js client library to handle GitHub OAuth authentication in my nextjs 13 frontend app:
// Login with GitHub
const { data, error } = await supabase.auth.signInWithOAuth({
provider: 'github'
})
U nder the hood this is making an…

Fatah
- 2,184
- 4
- 18
- 39
0
votes
0 answers
.or method with 2 different relation tables in supabase js
I have 2 tables as shown below where user table stores the users profile details and friends table which stores the friendship relation between 2 users where sent column links with user who has sent the request and recieved column links with user…

Deep Shetye
- 143
- 1
- 7
0
votes
1 answer
How to use JS client to pass formData to Supabase Edge function
I'm trying to call a Supabase edge function using the JS/TS client and pass audio from the client to the server. In doing this, I'm using formData on the client and trying to pass it in the body. Here's my client code:
const formData = new…

Brady Dowling
- 4,920
- 3
- 32
- 62