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
1
vote
1 answer

Supabase form reset after successful submit with nextjs app router

I am trying to figure out how to get my form to reset() after it submits in nextjs (app router). My form has: "use client" import { createClientComponentClient } from '@supabase/auth-helpers-nextjs'; import { useEffect, useState } from…
Mel
  • 2,481
  • 26
  • 113
  • 273
1
vote
1 answer

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 feature, where clicking a button on the navbar…
Vladimirzb
  • 87
  • 6
1
vote
1 answer

How to retrieve director_name and director_image here in supabase

Director (id,director_name,director_image) movies (id,movie_name,movie_description) movie_director(director_id,movie_id) // movie_id and director_id are the foreign key. const { data, error } = await supabase .from('movie_director') …
1
vote
1 answer

How can I implement Full text search by using Prisma + PostgreSQL ? (I'm using Supabase as the database)

This is my schema file below generator client { provider = "prisma-client-js" previewFeatures = ["fullTextSearch","fullTextIndex"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model Category { id …
1
vote
1 answer

how to insert data into table that has 2 columns in which col1 refers col2

I successfully inserted data by passing in hardcoded values (see 1st code snippet) to verify the relation between the 2 columns is valid. I want to know if there is a way to reference id's value in reply_id This is how I did manually inserted data: …
Asad
  • 106
  • 1
  • 11
1
vote
2 answers

Supabase - equal any value

For authorization flow, in middleware, I want to equal any value in a .eq statement. A normal user should only see a post if they created it. An admin should see any post though. const userMatcher = user.role === "admin" ? "*" : user.id; const {…
Sventies
  • 2,314
  • 1
  • 28
  • 44
1
vote
0 answers

Why can't I use useSupabaseClient() on my Vite - Nuxt - Supabase project?

I have a project created with Vite that uses Nuxt. Within the script, I want to use useSupabaseClient(), but I'm getting an "is not defined" error. The dependency @nuxtjs/supabase is installed and up to date. I believe the issue is in the import,…
1
vote
1 answer

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 to do this with the Auth component? I tried using…
Mitch
  • 11
  • 2
1
vote
1 answer

useSupabaseClient() returns undefined

I'm currently following Antonio's Spotify clone tutorial (at 2:08:00), but I've hit a stumbling block, useSupabaseClient() returns undefined, which causes this line to crash. Here's the crash…
1
vote
0 answers

how to setup an integration test with authentication

I'm developing a flutter application which interacts with a supabase backend for both API and Auth. The only authentication is via email, specifically by means of magic link. The problem: I want to write some end-to-end test, and to do that I'm…
Bertuz
  • 2,390
  • 3
  • 25
  • 50
1
vote
1 answer

Multiple join in Supabase JS

I have 3 tables in supabase. Message --> with foreign key 'request_id' to table Product_Request Product_Request --> with foreign key 'product_id' to table Product Product How can i select all messages data with info from the others table? I tried…
1
vote
2 answers

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: timestamptz, image_url: text, user_id: uuid, num_likes:…
Carson
  • 13
  • 4
1
vote
1 answer

Manage Supabase as an infrastructure-as-a-code for version control

I want to be able to manage my Supabase project as a code, with regards to the SQL tables, the functions, auth, et cetera. The purpose is to allow myself to version control the project. I have gone through the official documentation and have not…
1
vote
1 answer

How to group by in plpgsql

I'm having trouble in grouping my data where I am grabing records and grouping them by employer_type and date. Both have same date and same employer type but doesnt group instead returns 2 different obj. What could have been giving me this output?…
goaty
  • 107
  • 9
1
vote
1 answer

Can't run SQL scripts in Supabase while installing Quivr for first time

I am trying to follow the readme file instructions in order to install Quivr on my local machine through this link for the first time but I am stuck at step 4. How may I run the following code in SQL given it is a shell command? chmod +x…
moayad
  • 11
  • 2