Compare
Supabase vs Firebase when your vibe-coded app's backend is broken
The preview signed in yesterday. Today the request fails and the next prompt rewrites the client. Read which product you are calling, then the error body. The two backends do not share an allow list, a rules language, or a log screen.
Last verified Oct 20, 2026
What you are actually calling
A Supabase project is a Postgres database. Auth, Storage, Realtime, and Edge Functions sit on that database. The dashboard's Table Editor and SQL Editor are two views of it. A Firebase web app in these failures is usually Firebase Authentication plus Cloud Firestore. Firestore client requests are checked against Security Rules. The server client libraries bypass those rules and use Google credentials instead. This page does not list prices.
Where sign-in is allowed to return
Supabase Auth checks redirectTo against the Redirect URLs list on the URL Configuration page. If you omit redirectTo, it uses the Site URL. The redirect guide says to change Site URL from http://localhost:3000 to the production origin. * does not cross / or .. ** does. For Vercel previews the guide says to add https://*-.vercel.app/** and to keep http://localhost:3000/**. A deployed app that still opens localhost is the Site URL case on Error 400: redirect_uri_mismatch. A bounce between login and the app, with no domain error, is a redirect loop.
Firebase Auth throws auth/unauthorized-domain when the app's domain is not authorized for OAuth operations. The email-link guide adds a domain at Security, then Authentication, then the Settings tab, then Authorized domains, then Add domain. Projects created after April 28, 2025 do not include localhost until you add it. A custom authDomain also has to be on that list, and the Google sign-in guide says the OAuth setup page must allow https://<authDomain>/__/auth/handler. The steps are on Firebase: Error (auth/unauthorized-domain). A 403 of API_KEY_HTTP_REFERRER_BLOCKED, API_KEY_SERVICE_BLOCKED, or auth/invalid-api-key is the Google Cloud key restriction, not that domain list: Firebase API key referrer or API restriction blocked. Adding the app URL on one product does not fix the other.
Who is allowed to touch a row
Supabase uses Postgres grants and Row Level Security. Grants decide whether anon or authenticated can run the command. Policies are SQL, attached to a table, and they decide which rows. The RLS guide says a table in an exposed schema without RLS is readable and writable by any role that has a grant, and that adding a policy does not revoke a grant. permission denied for table with SQLSTATE 42501 is the grant failure: permission denied (42501). new row violates row-level security policy is the policy failure: RLS blocks the insert. relation "public.profiles" does not exist (42P01) and PostgREST PGRST205 mean the table is not in the schema cache yet: relation does not exist.
Cloud Firestore Security Rules are match paths and allow expressions, not SQL. The Firestore guide says every request from a mobile or web client library is evaluated against those rules, and the whole request fails if a path is denied. The client error code for that denial is permission-denied. The Firestore quickstart calls the locked-down setup Production mode: it denies all reads and writes from mobile and web clients. Rules are published from Databases & Storage, then Firestore, then the Rules tab, or with firebase deploy --only firestore. Test mode rules and an allow read, write: if true rule are not a fix. The rules guide says not to use that ruleset in production.
The errors that show up before any rule runs
supabaseUrl is required. and supabaseKey is required. throw inside createClient when the URL or key is empty. That page is a missing build-time variable. Invalid API key means the request arrived and the key does not match the project: Invalid API key. A paused Free Plan project returns HTTP 540 and cannot process requests. The pausing guide says a Free Plan project with too little user database activity over the past week is what gets paused, and Resume project works for up to a year. Paid projects are not paused for inactivity. Paused or unreachable is that case. An Edge Function that never answers OPTIONS is the preflight failure, which is narrower than a generic CORS block.
Firebase's domain check is the unauthorized-domain error above. A Firestore permission-denied is the rules check, not a missing hostname. The REST error table uses PERMISSION_DENIED for the same idea and says not to retry until the authorization problem is fixed.
Where the log actually is
In Supabase Studio, open Logs. The log types include API Gateway, Postgres, Auth, Storage, PostgREST, Edge Function, Realtime, and the pooler. Edge Function invocations are function_edge_logs. Console output is function_logs. For one function, the functions logging guide says to open the Functions section, select the function, then Invocations or Logs. A browser Failed to fetch with status 540 will not appear as an RLS error in those logs. The project was paused.
Firebase's auth/unauthorized-domain and Firestore permission-denied are returned to the client. Read error.code there. Firestore rules can be tried in the Rules Playground: Databases & Storage, then Firestore, then Rules, then Rules Playground. The simulator runs against the rules in the editor, not against whatever is already published. The Local Emulator Suite UI, started with firebase emulators:start, has a Logs tab. This page does not name a production log viewer beyond that. The docs checked today did not give one path that covers Auth domain rejections.
Local dev
Supabase's CLI guide: supabase init, then supabase start, from the directory that now has supabase/config.toml. The stack runs in Docker unless you are on the experimental native runtime the install page describes. supabase db push applies unapplied migrations to the linked remote project. --dry-run prints them first.
Firebase's emulator guide starts the Local Emulator Suite with firebase emulators:start. The default UI port in that guide is http://localhost:4000, and the terminal output is what to trust if the port differs. The emulator page says not to treat the suite as a self-hosted production Firebase.
What Lovable, Bolt, v0, and Replit start you on
Lovable's built-in backend (Cloud) is the default. It is a database, auth, storage, and edge functions on Supabase's open-source foundation, managed by Lovable. You can connect a Supabase project you own instead. Lovable's docs say there is no one-click migration either way, and Supabase's identifying guide says a Cloud project does not appear in your Supabase dashboard. A paused-project check in your own dashboard only works for the project you connected.
Bolt's database doc says new projects use a Bolt database by default. Supabase is an option on Pro and Teams plans, chosen when the project is created or connected later from the database Advanced tab. Bolt's Stripe doc says that integration does not work with Firebase. Bolt is not a Firebase default.
v0's full-stack doc says it defaults to Next.js, and that database integrations include Supabase, Neon, Upstash, and Blob. You add one from the project menu, then Settings, then Integrations. That is not a backend that exists before you connect it. Firebase is not in that integration list.
Replit's database doc says the built-in database is PostgreSQL, with a development database and a separate production database when you publish. Replit Auth's doc says the managed sign-in is built on infrastructure that includes Firebase and Google Cloud Identity Platform. That is Replit's auth service, not a Firebase project whose Authorized domains page you open. Supabase appears as an MCP server you can add. The import doc says existing Supabase rows are not imported.
Getting the data out
Supabase's database overview says the project is Postgres, that daily backups are managed for you, and that point-in-time recovery is on paid plans. The same overview lists pg_dump as one way to load existing data in. Lovable says a Cloud backend and a Supabase project you own do not migrate with one click. Moving the Postgres database by itself does not move Auth, Storage, Realtime, or Edge Functions. The deployment doc says that explicitly.
Firestore data is documents and collections. Security Rules are a separate file you deploy. A Postgres dump is not a Firestore import. This page does not give an export command for Firebase. The docs checked today were the rules guide and the client error codes, not a migration tutorial.
When the broken app should stay where it is
Stay on Supabase when the failing call is /rest/v1, /auth/v1, or /functions/v1, or when the SQL Editor is where the table has to be created. Stay on Firebase when the thrown code is auth/unauthorized-domain or Firestore permission-denied. Switching products deletes the path that just failed and leaves the data behind. If the status page is red, or the project is paused, fix that before you ask for another client. The fix-loop guide is the sequence: one error, one change. The full list of fixes is the error index.
Sources
- Supabase redirect URLs
- Supabase Row Level Security
- Supabase free-project pausing
- Supabase database overview
- Supabase CLI
- Firebase authorized domains
- Firebase Google sign-in
- Cloud Firestore Security Rules
- Firebase Local Emulator Suite
- Lovable Cloud
- Lovable and Supabase
- Bolt database
- v0 databases
- Replit SQL database
- Replit Auth