All Questions

Tagged with
Filter by
Sorted by
Tagged with
13 votes
5 answers
4k views

Multiple GoTrueClient instances detected in the same browser context

I'm creating a project with nextjs and supabase. For an unknown reason, I'm getting the following warning in the console: Multiple GoTrueClient instances detected in the same browser context. It is ...
maaajo's user avatar
  • 979
7 votes
2 answers
7k views

How can I do select count(*) with "group by" in supabase-js?

How do I write a "group by" query in supabase-js? In traditional SQL it would look like this: SELECT COUNT(*), PLAYER FROM GAMES GROUP BY PLAYER Using React and supabase-js, my code so far ...
vikingsteve's user avatar
  • 39.4k
7 votes
2 answers
9k views

NextJS getServerSideProps pagination

I am using NextJS and Supabase for database. I am not sure how to use pagination here. Because the solution I am looking is passing query to the API. I cant do that because I am directly fetching it ...
kelly's user avatar
  • 115
6 votes
4 answers
6k views

supabase in Next JS returning an empty array when data is in relevant tables

It seems I am always returning an empty array when trying to pull data from my tables. This is how I am doing it, after following the docs and several tutorials. const [tableData, setTableData] = ...
mrpbennett's user avatar
  • 1,746
6 votes
5 answers
17k views

Error: supabaseUrl is required (supabase) postgresql

i'm using supabase postgresql online, in which important create a .env file where is my online DMBS's URL and anon key is saved and a "supabase client" file also create to access DBMS and ...
Muhammad tanzeel's user avatar
6 votes
1 answer
3k views

supabase query for one-to-one foreign key, return single value (not array)

How can I query a one-to-one relationship with foreign key in supabase? My tables: games (id, created_at, played_at) results (game_id, key) Data: games ("id": 1, "created_at": &...
vikingsteve's user avatar
  • 39.4k
6 votes
2 answers
5k views

Supabase login get user session and profile at the same time

Is there a way to get the user session and profile at the same time? The way I did it would be get the user session first after login then fetch the user profile using the id. const [authsession, ...
Naterz's user avatar
  • 417
5 votes
3 answers
6k views

Error: "Only async functions are allowed to be exported in a 'use server' file"

I am trying to use layout.tsx in the app directory of Next.js 13 to have a nav layout that is present on all the pages. I managed to make it so that when the user logs out/signs in, the navbar changes,...
Vladimirzb's user avatar
5 votes
2 answers
524 views

Error in handling error messages for login: http://localhost:3000/auth/login net::ERR_ABORTED 405 (Method Not> Allowed)

I have this /app/auth/login/route.ts import { createRouteHandlerClient } from '@supabase/auth-helpers-nextjs' import { cookies } from 'next/headers' import { NextResponse } from 'next/server' export ...
JS3's user avatar
  • 1,729
4 votes
2 answers
5k views

Nexts.js 13 + Supabase > What's the proper way to create a user context

I'm building an app with Next.js 13 and Supabase for the backend, and I've been stuck on figuring out the best/proper way to go about creating a context/provider for the current logged in user. The ...
Ryan Roberts's user avatar
4 votes
2 answers
8k views

new row violates row-level security policy for table "tasks"

I am new to supabase and am trying to integrate my Todo App made with BlueBase, a Framework based on react and react native. And, I am facing such a problem. CreateTaskScreen.tsx import React from '...
Muneeb's user avatar
  • 63
4 votes
1 answer
1k views

Next JS + Supabase real time subscription subscribes with state "closed"

I am working on this helpdesk for a school project using Next JS and Supabase and got stuck on realtime chat between the operator and the client. I subscribe to the table in useEffect hook and return ...
vskorepa's user avatar
4 votes
3 answers
6k views

How can I insert un-exist record and skip exist record in Supabase?

How can I use insert but skip the records I already have in my Supabase? I have a very huge records that I've done scraping from it (over 3000 records, exactly is 3393 records) I thought that INSERT ...
Bunny's user avatar
  • 596
4 votes
1 answer
702 views

Supabase Google auth integration with Capacitor (React) for iOS

I am trying to integrate Supabase Google Auth into my Hybrid app built with Capacitor. It is working fine for web, but I am not able to get it working for iOS. There isn't any documentation around ...
Manarjan Singh Ghai's user avatar
4 votes
2 answers
626 views

Upload image after clicking on submit button, not on input change

I want to create a form that uploads the images to Cloudinary and then gets the image's URL and parses it into Supabase database, but I only want to upload the images when I click the Publish button (...
Tan Huynh's user avatar
  • 125
4 votes
1 answer
6k views

How to update the password of a Supabase user on a NextJs project?

I'm facing an issue updating a password for a supabase user on a BlitzJs (NextJs) project. Basically, I have a reset password method that works perfectly. First I send an email with a reset link, that ...
Manu's user avatar
  • 402
3 votes
3 answers
3k views

How to use Redux RTK Query with Supabase

Does anyone know how to use the Supabase Query pattern combined with RTK Query like for example https://dev.to/sruhleder/using-react-query-with-supabase-a03.
dsds's user avatar
  • 165
3 votes
2 answers
4k views

Cannot access env variables next.js [duplicate]

I'm creating an app with Next.js and Supabase. When I create the client in /utils/supabase-client.js, it throws the error that Error: supabaseUrl is required.. Here is my file: import { createClient } ...
Emiliano's user avatar
  • 697
3 votes
3 answers
7k views

Supabase onAuthStateChanged - How do I properly wait for the request to finish prevent flickering with useEffect?

Everything auth-wise is working fine. I even have a loading state setup so that the loader shows until the state is changed, but I still get this flickering on reload. This flickering only happens ...
user avatar
3 votes
1 answer
694 views

Best practice for integrating clerk with supabase

I came up with my custom react hook for handling supabase, I don't know if using this hook everywhere would be the best practice as I have to deal with isLoading every time when I use it. import { ...
xxx222's user avatar
  • 3,164
3 votes
1 answer
3k views

AuthRetryableFetchError with Supabase Auth

I've recently rewritten parts of my Supabase webapp, but something started to crash. When I call handleSignIn with the form on my site it refreshes (obviously no session is set nor any user is logged ...
IVOBOT's user avatar
  • 101
3 votes
2 answers
168 views

Input type hidden value not being recognized when deployed on vercel

Whenever, I try to update the data on Vercel, this is the error that it shows: invalid input syntax for type uuid: "undefined" - unable to save However, it successfully updates the data ...
JS3's user avatar
  • 1,729
3 votes
1 answer
4k views

How to handle redirect from supabase signin?

I was hoping someone would show me how to handle redirect (to dashboard page) in supabase. Here below is a sample of my code (the issue is I would like to redirect to an account page after ...
Chrissy's user avatar
  • 45
3 votes
1 answer
722 views

Using Google Oauth with supabase, can't login with different account

I am using supabase Oauth Google provider in one of my projects, after the initial login with one of my accounts, when i logout and try to login again using google, it uses the same old account to ...
Alucard's user avatar
  • 110
3 votes
2 answers
797 views

Supabase join returning 1 object instead of list of objects

I am trying to query my posts table for a post, which contains the user's user_id and I want to join it with the profiles table using the user_id. post table schema: (post_id: uuid, created_at: ...
Carson's user avatar
  • 73
3 votes
0 answers
375 views

supabase "TypeError: fetch failed" using next.js

I am trying to make a request to nextjs route handler where I am using supabase database to retreive some rows from a particular database table. The table exist and it is already filled with rows. ...
26ph19's user avatar
  • 363
3 votes
2 answers
470 views

Next Js with Supabase Failed to compile

I created a project with Next.js and Supabase, and everything was running smoothly. However, after adding a table and generating TypeScript Definitions from the PostgreSQL schema using Supabase CLI, I ...
Dindin Solehudin's user avatar
3 votes
3 answers
249 views

Conditionally rendering UI based on cookies and supabase affects the rest of my program Next.js 13

I am trying to conditionally render an account button when a user is authenticated; render a login + sign-up button when the user is not authenticated as follows: My DesktopBar.tsx file import { ...
Daniel Craciun's user avatar
2 votes
1 answer
7k views

Redirecting to Origin URL with Next.js Route Not Working

I'm currently working on a Next.js application where I have a layout component inside the app directory. Within that component, I have a navbar client component. I'm attempting to implement a logout ...
Vladimirzb's user avatar
2 votes
1 answer
2k views

How to check if user already exists in Supabase?

How can I check if a user with the same email already exists when Enable email confirmations is turned on. When Enable email confirmations are turned on an obfuscated / fake user object is returned by ...
B45i's user avatar
  • 2,498
2 votes
3 answers
5k views

Row-level security problems when creating a supabase's bucket

everyone. I'm new to Supabase and I'm exploring all the features available in this amazing platform. Unfortunately I'm having some troubles with bucket creation. I tried also create manually the ...
Gustavo's user avatar
  • 21
2 votes
1 answer
1k views

How to subscribe to realtime data from Supabase in React Native application?

When I try to subscribe to my Supabase database for realtime updates, I am able to listen to changes (Insert/Update/Delete) but my React state resets. For example, let's say I get 5 names in the ...
Prateik's user avatar
  • 55
2 votes
1 answer
4k views

Count the occurrences of DISTINCT values using supabase

I want alternative supabase code for this SQL command SELECT order_date,COUNT(*) as count FROM orders GROUP BY order_date ORDER BY order_date Desc; What I am trying to do is, I want the number of ...
Hadi azeez's user avatar
2 votes
1 answer
685 views

Supabase join with sdk on auth.users() table

I have this table called appointments: ---------------------------------------------------------------------- | id | createdat | date | timeslot | user_id (FK on auth.users().id) ---------------------...
Menash Bouhadana's user avatar
2 votes
1 answer
2k views

Mocking supabase-js supabase.auth.signUp

I want to mock supabase.auth.signUp of @supabase/supabase-js. I am not directly calling supabase.auth.signUp, but in a wrapper I created. If I don't use jest.fn(), but a default JS function, it is ...
HotFix's user avatar
  • 185
2 votes
2 answers
2k views

Get count and specify range in a supabase js query

Im making a recipe website with nextjs and supabase. I have an occasions table which has a foreign key to many recipes. I can easily query the occasions for all recipe in that occasion however I want ...
Yesthe Cia's user avatar
2 votes
1 answer
2k views

TypeError: supabaseClient.auth.getSession is not a function. Error with NextJS and Supabse

I'm using supabase auth helper package to React and Next in my project. Immediately, when I start the page, I get an error message that says the following: And it is that I am not calling that ...
Cesar Mejias's user avatar
2 votes
1 answer
728 views

Stripe webhook checkout.session items to Supabase

Im using next.js and Stripe webhooks to insert checkout sessions to Supabase that will create a customer's order history. I'm able to get the information about the whole order written to a table ...
Steve's user avatar
  • 71
2 votes
1 answer
873 views

Supabase not storing session data in localstorage correctly

I have a vite + react + supabase application and I have a simple signup/login form. Signup and login seem to be working, except that session data is not being stored in localstorage (it's my ...
Kyle Pendergast's user avatar
2 votes
1 answer
374 views

How can I stop the infinite loop in my React supabase Authentication?

I have two files a "Home" and a "LoginPage". The defined routes are that "/" goes to LoginPage and "/home" goes to Home. When I try to login using the Auth ...
Jack Hanlon's user avatar
2 votes
2 answers
3k views

supabase download image bad request headers should have required property 'authorization'

im having trouble downloading an image from supabase. I get this errror { "statusCode": "400", "error": "Bad Request", "message": "headers should ...
KeoooDev's user avatar
  • 536
2 votes
1 answer
700 views

Next.js server side props not loading in time

I'm using supabase and trying to load the user session on the server side. If you refresh the page, it catches there is a user but not on first load (e.g. like when coming from a magic link). How can ...
Noah Wardlow's user avatar
2 votes
0 answers
434 views

How to configure supabase to use a http cookie to store the session?

I'm currently storing the old access and refresh token inside a http only cookie from a Next JS route handler that I can recall to set the previous session again (which I do in the middleware), ...
Typhon's user avatar
  • 153
2 votes
2 answers
667 views

Expo/Supabase app receives a Network request failed error after a while

I have built an app with Supabase and Expo (React Native). The app works well and everything is fine. However, After I leave the app open for a while, I get an error which is difficult to track. It ...
Shalaw Fatah's user avatar
2 votes
1 answer
211 views

How to use a custom ConfirmationURL with @supabase/auth-ui-react?

I'm building a React app with the Auth component from @supabase/auth-ui-react, and I want to take the user to a specific path after they click the email confirmation link on signup. Is there any way ...
Mitch's user avatar
  • 21
2 votes
1 answer
411 views

Can I use my own custom component for Supabase auth-helpers?

I can't get the Auth component provided by @supabase/auth-ui-react to match my design and I'd also like to add additional inputs. Can I use my own Auth component and still use @supabase/auth-helpers-...
Mintee's user avatar
  • 655
2 votes
0 answers
551 views

Supabase auth callback hash

Toying around with Supabase to switch from firebase for a hobby project. Using facebook as auth provider, and it works fine. But when logging in the callback leaves a # in the URL. How do I get rid of ...
Kasper Verner's user avatar
2 votes
0 answers
1k views

supabase.auth.onAuthStateChange Not Working when React app is in iframe

I am using Supabase user authentication in a React app hosted at https://example.com that is running inside an iframe injected by a Chrome extension chrome-sidebar when the browser is on a different ...
gameveloster's user avatar
  • 1,213
2 votes
1 answer
1k views

supabase onAuthStateChange not re-rendering useEffect

I have the following custom hook useAuth, in which I am having a supabase.auth.onAuthStateChange event listener. export const useAuth = () => { const [session, setSession] = useState(supabase....
HexaCrop's user avatar
  • 4,073
2 votes
0 answers
101 views

Create a ranking mechanism like Algolia

I'm creating a platform to search products based on certain filters. Let's say I have filters A, B and C and a database of around 20,000 products. What I'm trying to build is a way to create a ranking ...
Charles de Dreuille's user avatar

1
2 3 4 5 6