Category

Supabase

Explore our curated collection of articles, insights, and stories about Supabase.

34 Articles
Supabase "__cf_bm" Cookie Rejected for Invalid Domain: Fix
Supabase
8 min read·2026-09-06

Supabase "__cf_bm" Cookie Rejected for Invalid Domain: Fix

The warning fires on every image, upload and WebSocket that touches <ref>.supabase.co in Firefox. It is Cloudflare's bot-management cookie being scoped to a Public Suffix List domain, so every browser drops it. Here is the verified cause, the cases where the noise hides a real 403 or auth bug, and how to tell them apart in two minutes.

Read more
Better Auth vs Supabase Auth 2026: Honest Verdict
Supabase
10 min read·2026-08-23

Better Auth vs Supabase Auth 2026: Honest Verdict

Both of these will authenticate a user perfectly well, so comparing sign-in methods is a waste of your afternoon. The decision that actually costs you later is where authorisation is enforced. Supabase Auth puts a user id inside the database so policies can use it; Better Auth puts sessions in a table you own and leaves enforcement to your application. Pick the wrong one and you are rewriting your security model, not swapping a library.

Read more
Fix AuthSessionMissingError: Auth session missing!
Supabase
8 min read·2026-08-23

Fix AuthSessionMissingError: Auth session missing!

`AuthSessionMissingError: Auth session missing!` is not a bug report — it is Supabase telling you, accurately, that the client you called had no session to work with. The hard part is that the same message covers a signed-out user, a server client that never received your cookies, a middleware that forgot to forward them, and a `getUser()` call that fired before the session was restored. Each has a different fix.

Read more
Supabase Hangs After onAuthStateChange: The Deadlock
Supabase
8 min read·2026-08-23

Supabase Hangs After onAuthStateChange: The Deadlock

Your app loads, the session arrives, and then every Supabase call after it hangs forever. No error, no rejected promise, no network request — the query simply never returns and the loading spinner stays up until someone reloads the page. If you fetch a profile inside your `onAuthStateChange` callback, this is a documented deadlock in supabase-js, and the fix is one line.

Read more
Supabase 42501: permission denied for schema auth
Supabase
8 min read·2026-08-23

Supabase 42501: permission denied for schema auth

A view over `auth.users`, a policy that joins it, or a client query against it all fail the same way: `ERROR: 42501: permission denied for schema auth`. It is not a missing GRANT you forgot — Supabase keeps the `auth` schema out of reach of the API roles deliberately, and granting your way in is the one fix you should not apply. The supported route is a security definer function.

Read more
Test Supabase RLS Policies Before You Ship
Supabase
9 min read·2026-08-23

Test Supabase RLS Policies Before You Ship

Every RLS leak I have seen shipped the same way: the policy was tested in a context that does not enforce it. The Supabase SQL editor runs as a privileged role, the service key carries `BYPASSRLS`, and the table owner is exempt from its own policies unless you say otherwise. Three green checks, zero enforcement. This is the procedure that actually tests a policy — plus the two Postgres flags that decide whether your test means anything.

Read more
Firestore PERMISSION_DENIED: Every Real Cause and Fix
Supabase
7 min read·2026-08-14

Firestore PERMISSION_DENIED: Every Real Cause and Fix

The Firestore error "PERMISSION_DENIED: Missing or insufficient permissions" never tells you which rule rejected you. Here is how to find out — and the seven causes that account for almost every occurrence.

Read more
Supabase getClaims() vs getSession(): The Silent Auth Bug
Supabase
7 min read·2026-06-27

Supabase getClaims() vs getSession(): The Silent Auth Bug

Your auth looks correct but users can bypass it. The bug: getSession() in server code reads from local storage without revalidating the token against the Auth server.

Read more
Supabase redirectTo Failing on Vercel Previews: SITE_URL Fix
Supabase
6 min read·2026-06-27

Supabase redirectTo Failing on Vercel Previews: SITE_URL Fix

The redirect lands on your production domain instead of the preview URL, or you get a "redirect URL not allowed" error. Here is the exact Supabase dashboard config and the Vercel env var pattern.

Read more
Supabase Realtime Not Receiving Events: Complete Fix
Supabase
8 min read·2026-06-17

Supabase Realtime Not Receiving Events: Complete Fix

A Supabase Realtime subscription can say SUBSCRIBED and still receive nothing. This fix walks through RLS, filter syntax, stale React subscriptions, paused projects, and broadcast versus postgres_changes confusion.

Read more
How to get COUNT(*) in Supabase
Supabase
5 min read·2026-06-06

How to get COUNT(*) in Supabase

If you are fetching whole result sets just to count them, you are paying for bandwidth and latency you do not need. Supabase already returns counts in query metadata.

Read more
Supabase bucket RLS policy for table objects fix
Supabase
7 min read·2026-06-06

Supabase bucket RLS policy for table objects fix

This Storage error almost never means Supabase is broken. It usually means your upload path, your RLS policy, or your use of `upsert` does not match how Storage actually authorizes writes.

Read more
Does Supabase service_role Bypass RLS? Yes — Use It Safely
Supabase
12 min read·2026-06-04

Does Supabase service_role Bypass RLS? Yes — Use It Safely

The Supabase service_role key bypasses every RLS policy in your database. That is exactly what you want for admin jobs, migrations, and cron tasks — and exactly what an attacker wants if it ever leaks to the client bundle. Here is how to set up the admin client in Next.js, where it is safe to use, and the three mistakes that put a root credential in your JS bundle.

Read more
Supabase 42501 Permission Denied: Schema public & auth
Supabase
7 min read·2026-06-02

Supabase 42501 Permission Denied: Schema public & auth

Learn the exact steps to grant the right permissions in Supabase and stop the 'permission denied for schema public' error from breaking your app.

Read more
Supabase Auth Error Codes: Fixes + TS Cheat Sheet (2026)
Supabase
9 min read·2026-05-19

Supabase Auth Error Codes: Fixes + TS Cheat Sheet (2026)

Supabase Auth returns precise error codes — `invalid_credentials`, `weak_password`, `same_password`, `email_not_confirmed` — but most apps collapse them all into "Something went wrong." Here's the full TypeScript enum, a typed handler, and the UX pattern that doubles signup completion.

Read more
Fix Supabase RLS Infinite Recursion (Production 2026)
Supabase
9 min read·2026-05-19

Fix Supabase RLS Infinite Recursion (Production 2026)

If your Supabase query returns `infinite recursion detected in policy for relation "X"`, your RLS policy is querying the same table it protects. Here's exactly why it loops, and three production-grade fixes that don't leak data.

Read more
Clerk vs Better Auth vs Supabase: Next.js Auth in 2026
Supabase
22 min read·2026-05-14

Clerk vs Better Auth vs Supabase: Next.js Auth in 2026

We tested all four major auth solutions across 50+ real-world scenarios in production. Here is the honest comparison nobody else gives you — including the middleware vulnerability that changed everything, migration costs, and which one actually scales.

Read more
11 Supabase Auth Lessons From a Year in Production
Supabase
11 min read·2026-04-20

11 Supabase Auth Lessons From a Year in Production

Eleven recurring traps that surface once Supabase Auth is wired into a production Next.js app — drawn from public Supabase docs, the SSR guide, and the postmortems the community has published.

Read more
Why Your Supabase Queries Are Slow (And How to Fix)
Supabase
13 min read·2026-04-15

Why Your Supabase Queries Are Slow (And How to Fix)

Slow Supabase queries kill your app feel and inflate your bill. Here are the six causes I keep seeing in production apps, and the exact SQL and code fixes for each one.

Read more
Supabase + Next.js Tutorial for Beginners (Free, 2026)
Supabase
20 min read·2026-03-26

Supabase + Next.js Tutorial for Beginners (Free, 2026)

Build a complete full-stack application with Next.js and Supabase from scratch. Authentication, database, CRUD operations, and deployment — all in 20 minutes.

Read more
Supabase vs Firebase in 2026: The Honest Comparison
Supabase
18 min read·2026-03-26

Supabase vs Firebase in 2026: The Honest Comparison

Supabase vs Firebase — which backend should you pick in 2026? We compare pricing, performance, developer experience, and scalability with real benchmarks and code examples.

Read more
Why Developers Switch from Firebase to Supabase in 2026
Supabase
15 min read·2026-03-26

Why Developers Switch from Firebase to Supabase in 2026

Thousands of developers are migrating from Firebase to Supabase. Here is why — with real migration stories, cost savings, and a step-by-step guide to make the switch.

Read more
Debugging Supabase RLS Policies: A Simple Checklist
Supabase
13 min read·2026-03-17

Debugging Supabase RLS Policies: A Simple Checklist

Master RLS debugging techniques. Learn how to identify, diagnose, and fix Row Level Security policy issues that block data access in production.

Read more
7 Next.js + Supabase Architecture Decisions I'd Skip
Supabase
8 min read·2026-03-17

7 Next.js + Supabase Architecture Decisions I'd Skip

After shipping multiple production apps with Next.js and Supabase, here are the decisions that cost the most time to undo — and what I'd do instead from day one.

Read more
Supabase RLS Policies Silently Failing: How to Debug Them
Supabase
7 min read·2026-03-17

Supabase RLS Policies Silently Failing: How to Debug Them

RLS failures don't throw errors — they return empty results. Here is exactly how to find and fix the most common Row Level Security bugs in Supabase before they reach production.

Read more
7 Lessons From Running Next.js + Supabase in Production
Supabase
8 min read·2026-03-14

7 Lessons From Running Next.js + Supabase in Production

Seven recurring patterns from production runs of Next.js + Supabase, and the fixes that prevented the most common failures.

Read more
Supabase Auth MFA (TOTP) in 2026: Patterns That Scale
Supabase
9 min read·2026-03-12

Supabase Auth MFA (TOTP) in 2026: Patterns That Scale

How we went from failing enterprise security requirements to passing SOC 2 compliance in 6 weeks. The authentication architecture patterns that actually work at scale.

Read more
Enable Supabase Realtime: ALTER PUBLICATION + 7 Fixes
Supabase
11 min read·2026-03-03

Enable Supabase Realtime: ALTER PUBLICATION + 7 Fixes

Avoid common Supabase Realtime pitfalls that cause memory leaks, missed updates, and performance issues. Learn real-world solutions from production applications.

Read more
Next.js + Supabase: 10 Production Mistakes + Fixes (2026)
Supabase
14 min read·2026-02-25

Next.js + Supabase: 10 Production Mistakes + Fixes (2026)

Avoid these critical mistakes when building with Next.js and Supabase. Learn from real-world errors that cost developers hours of debugging and discover proven solutions.

Read more
Supabase Auth Session Disappears on Refresh? Fix (2026)
Supabase
8 min read·2026-02-16

Supabase Auth Session Disappears on Refresh? Fix (2026)

Supabase auth sessions mysteriously disappearing after page refresh? Learn the exact cause and fix it in 5 minutes with this tested solution.

Read more
Supabase AuthSessionMissingError in Middleware: 5 Fixes
Supabase
10 min read·2026-02-16

Supabase AuthSessionMissingError in Middleware: 5 Fixes

Auth errors crashing your Next.js middleware? Learn how to handle Supabase auth errors gracefully with proper error handling patterns.

Read more
Supabase Auth Callback Redirect Not Working? Next.js Fix
Supabase
11 min read·2026-02-16

Supabase Auth Callback Redirect Not Working? Next.js Fix

Auth redirect not working after Supabase sign-in? Here are the three root causes and the exact fixes — callback route, redirect URL allowlist, and router.refresh().

Read more
Supabase vs Firebase Authentication: Which is Better
Supabase
8 min read·2026-02-16

Supabase vs Firebase Authentication: Which is Better

Compare Supabase and Firebase authentication features, pricing, performance, and developer experience. Learn which backend solution fits your Next.js project best.

Read more
Supabase Email Confirmation Not Sending: 5 Fixes (2026)
Supabase
10 min read·2026-01-28

Supabase Email Confirmation Not Sending: 5 Fixes (2026)

Email confirmations not sending from Supabase? Learn the exact causes and fixes for SMTP, template, and configuration issues in 10 minutes.

Read more