Questions tagged [supabase]

Supabase is a collection of open source tools to build modern applications quickly and efficiently. It uses the PostgreSQL database to power its authentication, database, and storage features. Use this tag when you are having problems, and not to ask for new features.

Supabase is a combination of open source tools. It builds the features of Firebase using enterprise-grade, open source products. Supabase is not a 1-to-1 mapping of Firebase. Its aim is to give developers a Firebase-like developer experience using open source tools.

Supabase has an official JavaScript library as well as community built Dart, Rust, Kotlin, C# and Python libraries.

Supabase is composed of four components

  • Database
  • Authentication
  • Storage
  • Functions (coming soon)
1213 questions
3
votes
1 answer

supabase: how to reference files within tables

I want my users to be able to upload reports (PDFs). For this purpose, I have created a table of "reports" and thought that I can reference the object stored there. Therefore I created a column "file" with the foreign key reference to the object…
K. D.
  • 4,041
  • 9
  • 48
  • 72
3
votes
1 answer

Supabase Self hosting issue

I am trying to host Supabase with a separate PostgreSQL DB. According to their docs, they say that Supabase uses pgjwt for auth. However, AWS RDS or Azure PosrgreSQL doesnt not support pgjwt. Is there an alternate for pgjwt for PostgreSQL?? Thanks…
3
votes
1 answer

Role based authentication in Supabase

I am trying to make policy in supabase where a user with admin role can only get list of employees whose role are "agent" There is a "users" table and I am trying to add following policy "(auth.email() in (select users.email from users where…
Yash
  • 223
  • 2
  • 11
3
votes
0 answers

GetStaticProps Revalidate is not working as expected

Problem: Revalidate doesn't work when im useing (serverSideTranslations) from next-i18next. Please see my code below. When a new user register, an static page is generated for each language: (da (Default), en, sv, de). Everyting works fine with the…
3
votes
3 answers

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 with Supabase. I was using the Firebase version…
Vik
  • 215
  • 1
  • 4
  • 15
3
votes
1 answer

Row-level-security dual join

I have three tables journeys id user_id ... sections id journey_id ... stops id section_id ... I want to use row level security to make sure that a user can only insert a stop if the uid() matches the…
hoan
  • 1,277
  • 3
  • 18
  • 32
3
votes
1 answer

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 opens a page where the user can update his…
Manu
  • 372
  • 2
  • 12
3
votes
2 answers

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
  • 155
  • 1
  • 3
  • 12
3
votes
0 answers

How to filter text array with items in list case insensitively in Supabase?

I have a text array (text[]) in Supabase. Let's say it's like this: ["Car", "Red", "New"] I would like to get this row by filtering with list of words. So when I query new or car or red or any combination of these words, I should get the row with…
stackyname
  • 516
  • 5
  • 18
3
votes
2 answers

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 will automatically skip the existed records in my…
Bunny
  • 536
  • 6
  • 18
3
votes
2 answers

Sveltekit,Supabase and Vercel (problem with Supabase when deploying to Vercel)

I'm trying to set up Sveltekit, Supabase and Vercel. It works correctly on a local environment (SvelteKit and Supabase), but when I deploy it to Vercel there is a problem with Supabase - "Error: supabaseUrl is required" (I post a screenshot…
Todor Markov
  • 507
  • 5
  • 12
3
votes
2 answers

Can't insert into table with RLS despite being logged in?

I want to add a row to a profiles table in the public schema immediately after the user has signed up and their auth user has been created in the database. The user gets created successfully, and I can see the details of the user in the returned…
jm123456
  • 509
  • 1
  • 8
  • 20
3
votes
2 answers

How to implement cookie authentication with Sveltekit & Supabase?

I'm fairly new to both SvelteKit & Supabase and have done a bit of experimentation on my own, but I would like to know what is the best way to implement user authentication with both of these technologies. I currently have the following in my…
Mr.Bill
  • 179
  • 14
3
votes
1 answer

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 authentication but it wouldn't so I had to show the…
Chrissy
  • 45
  • 2
  • 6
3
votes
1 answer

How to sign in with Apple and Google credentials in react-native and supabase

I have been trying to implement sign in with google and apple using the following libraries and supabase in bare react-native projects. react-native-apple-authentication react-native-google-signin They work very well with firebase as described…
Hillkim Henry
  • 2,841
  • 13
  • 17