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

Cannot update Supabase table because it does not have a replica identity

When trying to my first table update using Supabase, with code like: await db.from("welcome").update({visit_count: newCount}); Got error: { "hint":"To enable updating the table, set REPLICA IDENTITY using ALTER TABLE.", …
Shorn
  • 19,077
  • 15
  • 90
  • 168
2
votes
1 answer

How to add linkedin auth to nextjs supabase project

I am trying to follow this tutorial. I am trying to add LinkedIn oauth instead of github. I have seen this documentation and have been attempting to follow its instructions. I have a sign in component with: 'use client' import {…
Mel
  • 2,481
  • 26
  • 113
  • 273
2
votes
1 answer

Supabase reset password error: "Auth Session Missing"

The following function fails with error "Auth Session Missing" const { error } = await supabase.auth.updateUser({ password: password, }); After getting the reset password link on my mail i redirect the user to '/reset' link. The link i get look…
Deep Shetye
  • 143
  • 1
  • 7
2
votes
1 answer

Supabase sign in with magic link not calling onAuthStateChange

I'm using react native and supabase I call await supabase.auth.signInWithOtp({ email: email, options: { emailRedirectTo: 'myURL', }, }) and this successfully sends the user an email. the user clicks the…
MobileMon
  • 8,341
  • 5
  • 56
  • 75
2
votes
1 answer

Supabase update with incrementing value

I am using supabase-js and have a table like this: userID: string timesVisited: number eventName: string I am using update like this: Admin.from(tableName).update([{userID,eventName,timesVisited}]) Currently I have to make two calls one to get…
Shivam Sahil
  • 4,055
  • 3
  • 31
  • 62
2
votes
1 answer

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 initial call and I set data to those 5 names and this…
Prateik
  • 33
  • 5
2
votes
1 answer

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 { useEffect, useState } from 'react' import { useAuth…
xxx222
  • 2,980
  • 5
  • 34
  • 53
2
votes
2 answers

Supabase Realtime detecting duplicates for the same event

I have a simple page where I'm inserting a message into a message table and then on the frontend detecting it. I have used the sample code provided. However, everytime, I seem to be detecting 3 events for every insert. Any ideas? mounted() { …
Saumil Shah
  • 1,383
  • 2
  • 11
  • 20
2
votes
1 answer

How to escape string characters in supabase js OR query?

I'm trying to write a query that matches rows where a user-provided string matches one of two text array columns. For example, imagine a table messages with text columns greeting and goodbye: // WORKS const greeting = 'Hello there' const goodbye =…
2
votes
1 answer

Error using Next.js13 and Next/Supabase auth

Once I do the login this problem appears : Failed to parse cookie string: [Error: The edge runtime does not support Node.js 'buffer' module. Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime]. middleware.ts: import {…
Kilsuu -
  • 21
  • 1
2
votes
0 answers

How can I get the image that OpenAI API returns and upload it to Supabase Storage?

I tried using the URL that is returned by default but there is a CORS issue on OpenAI's end which won't allow me to use fetch. So now I am trying to use b64_json but I cannot figure out how to get that in a format that can be uploaded. Everything I…
Globe
  • 169
  • 11
2
votes
2 answers

Supabase puts certain rows at the top

My Supabase JS client performs an INSERT on the messages table using the following. import { createClient } from "@supabase/supabase-js"; const supabase = createClient( "MY SUPABASE URL", "MY ANON KEY" ); async function…
Zacoons
  • 71
  • 1
  • 6
2
votes
1 answer

Where to place prisma seed.ts in Next.js 13 with appDir to apply seed data into supabase?

I am trying to apply seed data into supabase database from the Next.js 13 app that using appDir. In some tutorials and articles, you can place seed file in pages/api and once it runs next api server, seed data would be applied. I want to try that,…
Vicky
  • 21
  • 2
2
votes
1 answer

How to pass in parameters from client side to server side code in Sveltekit?

I've been trying to run a query to a Supabase database that needs a dog breed passed through and will return metrics about it, the breed is defined on the client side. I was able to get the server side query to run but the value is not going…
2
votes
1 answer

Sveltekit update reactive variable from form action

Hi! So I'm working on a simple crud application with Sveltekit and Supabase. I'm trying to implement this sorting feature by fetching the table with the added .order() function when the user selects a sorting option. My problem is that I want to…
Albin
  • 85
  • 7