All Questions

Tagged with
Filter by
Sorted by
Tagged with
36 votes
1 answer
45k views

How to access route parameter inside getServerSideProps in Next.js?

I want to query my Supabase table using the ID in the slug e.g. localhost:3000/book/1 then show information about that book on the page in Next.js. Table book/[id].js import { useRouter } from 'next/...
Tom Wicks's user avatar
  • 855
14 votes
1 answer
7k views

How can I send secure API requests from SvelteKit app, without showing API keys on the client side?

I'm using Supabase for a new Sveltekit app, with this template Currently, I'm passing the Supabase keys through on the client side, like this: const supabase = createClient( import.meta.env....
amatur's user avatar
  • 327
8 votes
3 answers
9k views

delete associated records in Supabase

When using Supabase, is there a clean / simple way in which I can delete all associated records together with an item? Say I have Posts and a Post can have many Comments. When I delete the Post I want ...
Sventies's user avatar
  • 2,600
8 votes
7 answers
3k views

Supabase Generate Types Failing

I am trying to run the command to update my typing via cli and it continues to give me the following error but when I debug this is all I get. Not much to work with. 2023/03/01 09:34:01 Recv First ...
Luke Longo's user avatar
7 votes
3 answers
12k views

How to pass params in Nuxt 3 server/api?

I can't figure it out how to pass params to an anonymous function in Nuxt 3. index.vue: <template> <form @submit.prevent="signUpNewsletter()"> <input type="email&...
wittgenstein's user avatar
  • 4,142
7 votes
1 answer
7k views

Supabase - Upsert & multiple onConflict constraints

I cannot figure out how to proceed with an Upsert & "multiple" onConflict constraints. I want to push a data batch in a Supabase table. My data array would be structured as follows: ...
Henri's user avatar
  • 1,661
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
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
7 answers
12k views

Filtering in join in supabase

Im using supabase with a database which have 2 tables (that are implicates in this issue). Tables are teachers and users. Both have ID and id_teacher/id_user respectively. Im working in a query where ...
Facundo Serrano's user avatar
5 votes
1 answer
4k views

Is there a way to perform full text search on multiple columns on Supabase with Javascript?

I've tried using many symbols to separate columns; ||, |, &&, & with and without spaces. For instance .textSearch("username, title, description", "..."); .textSearch(&...
Lunandd's user avatar
  • 55
5 votes
2 answers
3k views

How to change the redirecting url for Google OAuth with supabase?

I am trying to set up a website with supabase using Google OAuth for authentication. It's fairly easy and convenient to set up and works really well, by following this tutorial and consulting the docs....
jost21's user avatar
  • 1,238
5 votes
2 answers
2k views

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 ...
BeratK2's user avatar
  • 63
5 votes
1 answer
2k views

Access supabase database from edge function as admin

I'm coming from Firebase Function... Where I can use the Admin Library to access database from the Function bypassing all security rules? On supabase I didn't yet find a way to do that, the ...
Jackson D's user avatar
  • 160
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
1 answer
412 views

Supabase Auth UI: show the sign up UI not the sign in UI?

I am using Supabase Auth UI as the login / sign up auth provider for my website. Currently the Auth UI always shows the login button. I can get onto the sign up UI by clicking "Don't have an ...
gcl_codeguy's user avatar
4 votes
1 answer
6k views

supabase.auth.getUser() returns error on vue-router route guard

I am attempting to build a Vue application that uses Supabase authentication. Inside one of the route guards in the router file, I implemented supabase.auth.getUser() in order to retrieve the user ...
JS_is_awesome18's user avatar
4 votes
1 answer
5k views

How to insert timestamp without timezone using Supabase-JS client?

I want to insert current timestamp without timezone to Supabase. I know I can set default value of the timestamp column to NOW() but there can be some delay in the timing and I need it precise. I ...
Jakub Szlaur's user avatar
  • 2,042
4 votes
1 answer
2k views

supabaseUrl is required sveltekit

I'm having this problem for quite a while and want to solve this: According to supbase documentation you create a .env file VITE_SUPABASE_URL="YOUR_SUPABASE_URL" VITE_SUPABASE_ANON_KEY="...
equi's user avatar
  • 164
4 votes
4 answers
2k views

Supabase Edge function says no body was passed

I'm invoking a supabase edge function with the following async function getData(plan_data){ console.log(plan_data) console.log(JSON.stringify({plan_data})) const { data, ...
daredevil's user avatar
4 votes
1 answer
1k views

How to use bigint safely with Supabase JS

Postgres' bigint type holds 64 bit integers. But the Supabase JS library returns those values as JS numbers, which cannot safely store 64 bit integers AFAIK. What would be the correct way to handle 64 ...
Sumit Ghosh's user avatar
  • 1,133
4 votes
1 answer
3k views

Error when trying to call a supabase edge function

I am trying to call a supabase edge function in javascript but I am getting this error: access to fetch at 'https:/blablala.functions.supabase.co/hello-world' from origin 'http://localhost:5173' has ...
Sebastian Trygg's user avatar
4 votes
2 answers
3k views

Supabase "TypeError: fetch failed"

I am making a to-do list application with Supabase and NextJS-13 and while fetching the lists from Supabase, the server gave me this error Error Image My List table on Supabase has three columns: id ...
Vaibhav Jain'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
0 answers
963 views

Supabase SSR getSession always returns null

I've tried to check for session on server side in my NextJS project. I've used supabaseService client and also "createServerSupabaseClient" from @supabase/auth-helpers-nextjs both of those ...
Floky99's user avatar
  • 652
3 votes
4 answers
6k views

supabase bucket policy to insert file not working

I am trying to insert a file into a supabase public bucket, I've created basic policies to insert, select. when I try to upload a file though it returns { statusCode: '401', error: 'Invalid JWT', ...
risky last's user avatar
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
2 answers
233 views

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 ...
zacoons's user avatar
  • 123
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
1 answer
876 views

Supabase and Google Apps Script

Is it possible to use Supabase with Google Apps Script (GAS)? I'm new to Supabase and I've never tried to import external library to GAS before. I'm planning to use Supabase as a database for my ...
Ersih Frans's user avatar
3 votes
1 answer
4k views

Nuxt.js3 plugin's context becomes undefined

I am developing an application using Nuxt.js3 and supabase. Nuxt.js in plugins/supabase.server.js (I haven't figured out if server or client is better for this too.) I want to use "supabase = ...
takumikunn15's user avatar
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
395 views

Dynamic social sharing cards populated in <svelte:head>

I've built a blog website and am trying to implement dynamic social share cards for each individual blog. While everything appears to be working properly when I inspect the head element in developer ...
jrfii's user avatar
  • 41
3 votes
1 answer
123 views

Act on Behalf of GitHub User With Supabase Auth

I have a JavaScript browser app, and a ASP .NET Core Minimal API backend. The database is Supabase and the user authenticates with the GitHub Supabase auth provider. The app, whether backend or ...
Christian Findlay's user avatar
3 votes
0 answers
67 views

Supabase JavaScript Client multiple joins

I am facing a problem with my supabase + Nuxt application In Supabase I have setup the following tables. Users, Events and a many-to-many reference table called Guests. 1 User can host 1 event n ...
Tim's user avatar
  • 317
3 votes
0 answers
994 views

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 (...
Charlie Østergaard's user avatar
3 votes
3 answers
1k views

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 ...
Mr.Bill's user avatar
  • 179
2 votes
2 answers
3k views

How to use the signUp() method in Supabase to add additional user info when signing up

I am attempting to build a Vue.js application that includes authentication with Supabase. I wish to use the built-in Supabase signUp() method to handle additional user data when signing up. To do this,...
JS_is_awesome18'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
2 answers
2k views

Match PotsgreSQL timestamptz by exact value

I am using PostgreSQL 13.3 via Supabase.io. I have a table with a field called modified_at which has a type of timestamptz: CREATE TABLE IF NOT EXISTS knowledge_views ( id uuid NOT NULL DEFAULT ...
AJP's user avatar
  • 27.4k
2 votes
1 answer
6k views

Supabase JSON query JavaScript

Im trying to fetch single entry from my table that contains and JSONB array of objects. Can I match somehow that array to find the desired result? [ { "chats": [ { &...
Mugetsu's user avatar
  • 1,859
2 votes
1 answer
4k views

Cannot log out user on the server side (Next.js and Supabase)

How can I log out a user on the server side when using Supabase as the auth provider? I thought the simplest and most obvious solution would be to just do that: export const getServerSideProps: ...
Damian Kociszewski's user avatar
2 votes
1 answer
1k views

How to implement a callback when auth state changes in supabase

I'm struggling to implement an idea. If a user is logged in, I want to show a hidden div. For example in firebase I can do this: firebase.auth.signInAnonymessly() // Detecting if the auth state ...
Khaled-The-Dev's user avatar
2 votes
1 answer
3k views

Supabase: filter rows based on if any of their one to many relations has property

In supabase I have a list of tracks and each track can have multiple artists (kept in a separate table). I only want tracks in which at least one of the artists associated with that track contains a ...
Kishan Sripada's user avatar
2 votes
2 answers
2k views

Can I Auth a user through Firebase and use Supabase (private) buckets without relying on Supabase Auth users limitation

I have an Ionic application that use a pretty small file(1kb) to store user info. I want to implement cloud backup for it. The user just need to download it once, when restoring backup. All other ...
Rafael de Castro's user avatar
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
2k views

Can I use a service like Firebase or Supabase in a Tauri desktop application?

I am a full-stack web developer that has experience with JavaScript and React. I want to create a desktop application using these technologies using a framework like Tauri. I enjoy using services like ...
moetheman112's user avatar
2 votes
1 answer
2k views

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 ...
bob's user avatar
  • 65

1
2 3 4 5 6