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 ...
Tejas Magade's user avatar
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 ...
Chris McGlynn's user avatar
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 ...
nearhanfarhan's user avatar
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 ...
user24297792's user avatar
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 ...
Nikolay Melnikov's user avatar
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 ...
Inaara Kalani's user avatar
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 ...
wind_kind's user avatar
  • 591
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 ...
Eldor's user avatar
  • 1
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({ ...
Mohd Zaid's user avatar
  • 117
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 ...
Probmkr's user avatar
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 {...
John Solly's user avatar
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 .. ... ...
fparaggio's user avatar
  • 403
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 ...
alex's user avatar
  • 13
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 ...
user5156141's user avatar
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 ...
Leonard Marshall-Afzal's user avatar
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://...
J.James's user avatar
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 ...
kevin's user avatar
  • 3,208
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- ...
Neha Soni's user avatar
  • 4,317
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 ...
Alex N.'s user avatar
  • 23
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 ...
Henrik's user avatar
  • 886
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 ...
Muhammad Haekal's user avatar
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 ...
abdul rauf's user avatar
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 { ...
andrilla's user avatar
  • 609
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 ...
Alexis's user avatar
  • 57
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 ...
Roberto Valente's user avatar
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 ...
somethingElse's user avatar
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 ...
thib's user avatar
  • 96
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 ...
wpix's user avatar
  • 1
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;...
Try and Error World's user avatar
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 }, { ...
F_sants_'s user avatar
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 ...
AbedDoesCode's user avatar
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....
Harpreet's user avatar
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 ...
Ali Azlan's user avatar
  • 159
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:...
pyron_orion's user avatar
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 ...
Mohammed Yasin Mulla's user avatar
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 = ...
FathTech's user avatar
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 =...
Canberk Koç's user avatar
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 ...
octavemirbeau's user avatar
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....
AlxVallejo's user avatar
  • 3,157
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. ...
progNewbie's user avatar
  • 4,666
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 ...
Amy's user avatar
  • 11
0 votes
1 answer
38 views

RLS issues in Supabase arise when attempting to filter products based on the `company_id` stored in `auth.user_metadata`

I want to show a list of products to the right employees. Based on the structure below: Tina works at Company A (10), so I want them to see Apple Sam works at Company B (11), so they will see Banana. ...
iv444's user avatar
  • 935
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 ...
elvis obondo's user avatar
0 votes
2 answers
196 views

How to get the id of last insert in nextjs/supabase

With my current project i'm using supabase and nextjs. Something weird is occurring, after inserting a row into a table i want to get the id of said row, but it does not work and i have no idea why. ...
Peter Sander's user avatar
0 votes
1 answer
58 views

How do I use goto and make my Log in page the first thing the user sees?

Does anyone know what I'm doing wrong? My homepage is at src/routes/+page.server and I want users to be redirected there after they log in/sign up. Also, when I run this website, the first thing I see ...
Claryssa's user avatar
0 votes
0 answers
30 views

POST Method for connecting Supabase and Draftbit not working

I have tried to create a new record in Draftbit by following the instructions in this Draftbit blog https://draftbit.com/blog/how-to-create-a-native-mobile-app-for-your-supabase-back-end but it has ...
dmoney21's user avatar
0 votes
1 answer
65 views

How to check if an array has one of the objects in the query an throw all the objects inside of it in Supabase

maybe the title of the question is not the best but i don't know how to explain it better in just one line. So, to have context the best is to see the query that i'm doing in JavaScript for Supabase ...
lgodev's user avatar
  • 45
0 votes
1 answer
93 views

Database operations and changes not working in Supabase Edge Functions

Any database operation I perform inside an edge function is not working as expected. For example, if I insert a record, it will not persist to the database or if I select, it returns 0 records. I don'...
Ahmad Raza's user avatar
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 &...
regal beagl's user avatar
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, { ...
alexgarciaalcuadrado's user avatar