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
2
votes
1 answer

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 called 'orders', but am wondering what the best way…
2
votes
1 answer

How to add Markes to a Leaflet-map with coordinates from Supabase database?

I want to add some Markers from coordinates stored in a supabase database colomn. Here is my vue code: I'm script: export default { …
2
votes
5 answers

Get supabase `user` server side in next.js

I am attempting to get the current logged in supabase user while server side. I have attempted to use const user = supabase.auth.user(); but I always get a null response. I have also attempted const user = supabase.auth.getUserByCookie(req) but it…
Brenton Beltrami
  • 333
  • 6
  • 11
2
votes
1 answer

How to save a file from Supabase Storage using Node.js (converting blob to file)

I am downloading media files (mainly images) from Supabase Storage using from.download() in NodeJS. How can I save the Blob that is returned as a file on my local hard drive?
st_phan
  • 715
  • 9
  • 23
2
votes
1 answer

Designing a Multi-tenant SAAS Database with Postgres RLS

I want to design a multi-tenant SAAS database with PostgreSQL and RLS. I want to be able to host all users and the tenants in the same database and isolate their data with RLS. In my use case it makes sense for tenants to share a certain user data…
2
votes
0 answers

Query JSON array of object in Flutter Supabase

I'm using Flutter and Supabase and I'm trying to fetch all elements in a table that partially match an array field. I have a table with a jsonb array column that contains a list of objects (PollItem) converted in a json map as Map
clooock
  • 123
  • 1
  • 10
2
votes
1 answer

Database Error Saving New User error with Postgres Function?

For my website (backend support by Supabase), I have the built-in auth.users table, and a public.profiles table that includes text fields for email, username, and school. I have created a trigger and function that would, upon insertion of a new row…
Ryan Millares
  • 525
  • 4
  • 16
2
votes
2 answers

Row-level-security based on relation table data

I am getting into Supabase and to practice I am making a suuuper simplified website-builder. However I am having troubles with the row-level-security policies. I have three tables: user → with users' information like first name, last name,…
st_phan
  • 715
  • 9
  • 23
2
votes
1 answer

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 = createClient(~~)" from index.vue. However, I get…
2
votes
1 answer

Supabase middleware for business logic

New to the supabase universe. Simple questions Is there a way to setup middleware in supabase?. Can Supabase fulfill this? Add business logic middleware when creating an entity Add special validations (ie: validate a product has stock before…
delpo
  • 210
  • 2
  • 18
2
votes
2 answers

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 have required property 'authorization'" } I've followed the…
KeoooDev
  • 528
  • 4
  • 14
2
votes
1 answer

Phonetic Algorithms for Postgresql

please, I am working on a PoC for Person Real-time Identification, and one of the critical aspects of it is to support both minor misspelling and phonetic variations of First, Middle, and Last name. Like HarinGton == HarrinBton or RaphEAl == RafAEl.…
jfbaro
  • 301
  • 2
  • 10
2
votes
1 answer

Why is this empty?

Please does anyone know why this: SELECT to_tsvector('an'); returns nothing but SELECT to_tsvector('nn'); or SELECT to_tsvector('n'); or SELECT to_tsvector('aa'); do? I am testing this on PostgreSQL 13 running on SUPABASE. Thanks
jfbaro
  • 301
  • 2
  • 10
2
votes
1 answer

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 I ensure it does load before he page? List…
2
votes
3 answers

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 bucket and then upload some file and I got the same…
Gustavo
  • 21
  • 1
  • 2