Questions tagged [supabase-js]

For questions related to Supabase JS client. Consider also using the tag [supabase], if necessary.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
17 views

I want to get the user's info after user verifies email in supabase

I want to get the user's info after user verifies email in supabase. Is there anything something like auth events for email verification? I want to save some basic user's info in my DB but, after ...
0 votes
1 answer
28 views

Insert JSON object into JSON array column

I am working on a small project to learn Supabase and NextJS. I am trying to add a JSON object to my sites array which is defined as a JSON array. I want to add the config (and more in the future) to ...
1 vote
2 answers
101 views

How can I sign out a user with Supabase from an express API endpoint?

I am using node and express as a backend for API endpoints with Vite as a frontend. So far, I have been able to send info from frontend to backend for signing in and signing up a user. However, I've ...
1 vote
1 answer
45 views

500 SupabaseUrl is required error when deployed on Netlify

I developed an application using NuxtJs3 + supabase. I am using the @nuxtjs/supabase module as well. On my local dev things are working fine but when I deployed this on Netlify, I had the below error- ...
1 vote
2 answers
57 views

How to Use AND Operator with OR Condition in Supabase Query?

I'm working on a query in Supabase where I need to select specific columns from a table based on multiple conditions. Specifically, I need to select columns a, b, and c from a table where column e is ...
0 votes
1 answer
12 views

Calling Eventbrite API using Supabase edge function - why might a POST request give GET responses to endpoint

I'm using Supabase edge functions to make API calls to the Eventbrite API due to CORS constraints preventing me making the call from the client side of my React project. I'm trying to call the create ...
0 votes
1 answer
44 views
+50

Supabase, how to get the session on the mobile, after the account has been confirmed on the website

I have the following scenario. A user creates an account on a mobile app and lands in the /confirm screen on the mobile app. A user confirms the created account via clicking on the confirmation link ...
0 votes
1 answer
19 views

Context returns null initially and screens do not re-render when context returns a session

I have three basic routes with tanstack-router. I simply want to to check if there is an active supabase session supplied by my auth context. If there is a session go to the signup-success screen, if ...
0 votes
3 answers
38 views

Supabase Delete user from auth if failed user creation in database during sign up

I am using supabase authentication for sign up, and when a user successfully signs up, I am inserting a row in a "profiles" table that consists of other user details. I want to handle the ...
0 votes
0 answers
13 views

Storage of customer data to database during Supabse authentication process

in my mobile application, 2 different types of users are auth. client doctor. If type=client the data to the Client database must be stored. If type=doctor the data to the Doctor database must be ...
0 votes
0 answers
24 views

Not able to fetch Signed in user from Supabase after google Oauth Sign in

I am using Supabase OAuth for google sign up in my project. Below is the code where I have specified the redirect URL: const { data, error } = await supabase.auth.signInWithOAuth({ ...
0 votes
0 answers
10 views

npx supabase start Cannot find module: '../util/template'

When I run npx supabase start after npx supabase init and a few npx supabase start and npx supabase stop, Error: Cannot find module '../util/template' will occur. It is same when I run npx supabase ...
0 votes
2 answers
158 views

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 ...
0 votes
1 answer
27 views

Error Inserting into Supabase: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member

I'm getting this error Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.deno-ts(1320) In my Subapase Edge Function whose code is as follows: import {...
0 votes
1 answer
91 views

Supabase query for many to many relationship

I am trying to find a proper way to query m2m data using supabase client. I have three tables: public.sites column format id int8 name text auth.users (supabase auth table) column format .. ... ...
1 vote
1 answer
34 views

supabase auth ui not redirecting after successful sign in

I have followed: https://supabase.com/docs/guides/getting-started/tutorials/with-sveltekit?language=ts and verified that everything runs correctly and all files are in the right place/have the correct ...
0 votes
0 answers
68 views

Supabase Functions - trigger when a file uploaded into Storage bucket

I'm looking to create a "pipeline" to manipulate a user's file uploads from a form in my Next.js application. The files are uploaded into a bucket called user_uploads I want a Supabase ...
0 votes
0 answers
62 views

How to get email confirmation to work on Supabase local development environment

I working on authentication on a Supabase and SvelteKit project. I have setup the authentication client and Signup works fine, but the email confirmation is causing problems. I am running a local ...
0 votes
0 answers
46 views

Can't get variables with supabase status on github actions

When I start supabase locally and run pnpm supabase status -o env I get a nice collection of env vars, like ANON_KEY="eyJ...CJ9.eyJpc3......MTI5OTZ9.CRXP1A7WOeo....I0" API_URL="http://...
1 vote
1 answer
345 views

Supabase & NodeJS: Invalid claim: AuthApiError: invalid claim: missing sub claim with getUser(jwt)

I have a custom backend that needs to authenticate users before letting them request some Express endpoints. It works that way: NextJS (front-end) sends a request to NodeJS/Express (backend) with a ...
3 votes
0 answers
342 views

ReferenceError: window is not defined in React Native project after adding Supabase call

I'm using a React Native project with Expo v49, and I added a Supabase call to read some data from the database, and it works on ios/android, But when I open the web version, I get "...
0 votes
0 answers
94 views

Supabase Magic Link not working in Next.js 14

Magic link works when sent from Supabase dashboard, but not when sent from Next.js. The return url includes code in the searchParams instead of the intended token. Code // middleware.ts import { ...
0 votes
1 answer
148 views

How to set Supabase auth credentials in NodeJS?

I'm attempting to break my supabase database interactions out of my client Flutter app and into it's own dedicated NodeJS express app. At the moment, I've attached the credentials from the logged in ...
0 votes
1 answer
49 views

supabase ilike with multiple reference table

Is it possible to do filters or with multiple reference tables, like if we do it in raw postgresql query like below (just for example): SELECT reports.*, report_categories.*, report_details.* FROM ...
0 votes
0 answers
27 views

Supabase Javascript Realtime subscription useState not in sync

When calling the callFunc outside of this subscription context everything works fine and all my items are logged. However when I add a new Task callFunc will get called but the logged state is the ...
0 votes
1 answer
171 views

How to query Supabase to filter with relationship table and pagination?

I have two tables job and category with a 1:M relationship. I want to fetch up to 10 jobs at a time using pagination for a given category_name, which is a column from the table category. category_name ...
0 votes
0 answers
30 views

Self Hosting Supabase: Twitter Provider Oauth issue

how can i use twitter on self hosting instance on supabase? I read the docs but i don't found anything related to that concept. Also i look the docker compose and env files and i don't find any ...
1 vote
0 answers
190 views

supabase.auth.signInWithOAuth is returning an URL with #

I'm using ExpressJS and Supabase Auth to create a Sign In with Google Button. So, after a user click on a button, it will be redirect to the route "/login/google" and their, will be redirect ...
0 votes
2 answers
70 views

Use Postgres functions on Supabase Client js

I have table 'MyTable' containing the column 'observations' of type jsonb. The Json structure is as following: { ... obsList: [ { species: 'Goldfinch', number: 2 }, { ...
4 votes
2 answers
3k views

Supabase "TypeError: fetch failed"

I am making a to-do list application with Supabase and NextJS-13 and while fetching the lists from Supabase, the server gave me this error Error Image My List table on Supabase has three columns: id ...
0 votes
1 answer
361 views

TypeScript error in queryFn when using Supabase authentication with React Toolkit Query

I have been trying to use Supabase authentication with React Toolkit Query but I have been getting an issue in using the queryFn. Below is the code which uses the supabase.auth.signUp to sign up a ...
0 votes
1 answer
129 views

Supabase, Clerk, React, Vite: Multiple GoTrueClient instances detected in the same browser context

I'm trying to create a very basic app in which I'm using Clerk for Auth and supabase as my db. I've followed the tutorials that I could find and stitched something together which works pretty well ...
0 votes
0 answers
118 views

Only able to get specific columns with Supabase and Next.js

I'm only able to fetch certain columns out of my database. I'd like to get every row out of my table, but when I select all, nothing is returned. My table (shows) has 9 columns. I just created the ...
0 votes
0 answers
17 views

I want to create a local language dictionary

I created this stored function to retrieve my data CREATE OR REPLACE FUNCTION generate_word_data(word_input VARCHAR(255)) RETURNS JSONB AS $$ DECLARE word_record RECORD; phonetic_record RECORD;...
0 votes
1 answer
55 views

How to add new field to auth context than just the uid() in supabase?

Currently as I have found out that the Supabase only exposes auth.uid() to do query related to the logged in user. So I can create, read, update and delete based on the user who is logged in, what I ...
1 vote
1 answer
219 views

How to Dynamically Add Metadata to JWT Tokens in Supabase for Same User when signing in from Different Platforms

I am working on a project with two platforms, a Mobile App and an Admin App, both using Supabase for user authentication. I want to control data access for users based on the platform they are signed ...
0 votes
1 answer
87 views

How to join table many to one via supabase in reactjs?

I have a table where when I test it with the following query select *, category_product from product inner join category on product.category_id = category.id inner join type on product.type_product = ...
1 vote
1 answer
192 views

What is causing the error Cannot find name 'useSupabaseClient'. when using Nuxt 3 and Supabase?

Using npm I have installed Nuxt 3 and Supabase but in vs code I keep getting the following error; Cannot find name 'useSupabaseClient'. When I run npm run dev I get the following error message on the ...
0 votes
1 answer
235 views

Supabase update user phone number after authentication

Hi I am trying to update user phone number after authentication. I build an app using supabase and next js User authenticate using google login then I want user to confirm their mobile number so i ...
0 votes
1 answer
387 views

How to upload an image from gallery to supabase storage

I want users to be able to pick a profile picture from the gallery using the Image Picker from expo and upload it to supabase in a filename that is structured like this userid.jpeg. I then want to ...
0 votes
0 answers
117 views

Supabase and Next.js - How to make change password page accessible only to authenticated users

I have a next.js application and I am following the documentation for allowing users to reset passwords. So far, I built the password reset page and made it publicly accessible with a form asking for ...
0 votes
0 answers
26 views

Supabase SQL query function getting error 'structure of query does not match function result type'

I created a SQL query function for fetch projects from table but I am getting error structure of query does not match function result type Here's the function: CREATE OR REPLACE FUNCTION public....
0 votes
1 answer
185 views

Supabase Auth: Google Oauth is succesful, but onAuthStateChange is not triggered

I'm building a Google slides add on. The DB operations are implemented using Supabase and the frontend using React. I'm trying to use Supabase oauth to authenticate the user via Google. Here's my code:...
0 votes
2 answers
114 views

supabase auth listeners causing infinite rerendering

My app is wrapped in a provider that should pass the session state to the rest of the app. But the supabase auth listener code seems to infinitely rerender my component and I cannot figure out how to ...
3 votes
1 answer
682 views

Query a timestamp range in supabase

I have a table in my supabase database with two columns start end end. Both are of type timestampz. Now I want to query all entries where the current timestamp (Date.now()) is inbetween start and end. ...
1 vote
1 answer
132 views

Supabase Auth UI + Google Sign in not reaching AuthProvider

I'm using Vite + React Router v6 + Supabase Auth components with a Google OAuth provider. I double checked that the Google credentials are in Supabase configuration, https://{my_supabase_id}.supabase....
0 votes
0 answers
59 views

How do I check if a vector exists in the Supabase vector database?

const data = await req.json(); const { url, prompt } = data; const model = new ChatOpenAI({ modelName: "gpt-3.5-turbo" }); const loader = new CheerioWebBaseLoader(url); const docs =...
1 vote
0 answers
36 views

Supabase auth state lags behind when used in Root Layout (Next.js App router)

I've encountered an unusual behavior in my Next.js app (latest version, using App Router) integrated with Supabase Auth. I'm leveraging the Supabase auth state to conditionally render login/logout ...
0 votes
1 answer
279 views

supabase bucket getPublicUrl returns url that doesnt work

I'm using the supabase js API to create a public bucket and upload images to it. This works so far: const { data: bucket, error } = await supabase.storage.createBucket( bucketName, { ...
0 votes
1 answer
165 views

Supabase realtime filter on DELETE event not working

I've noticed that filtering works as expected when listening for UPDATE events, but not for DELETE events. I've verified that I have all the Replication settings enabled, and have run the alter table &...