Fixes › Questions answered
Questions answered (206)
Every question our fixes answer, grouped by area. Each link opens the exact answer on its fix page. Looking for an exact error message instead? Use the error code lookup.
Auth
- Do I need to change Google Cloud settings? (Magic link / OAuth login redirects to localhost:3000)
- Why localhost? (Magic link / OAuth login redirects to localhost:3000)
- Does http vs https matter? (Error 400: redirect_uri_mismatch (Google sign-in))
- Can I use wildcards? (Error 400: redirect_uri_mismatch (Google sign-in))
- Is the session actually gone? (User is logged out after page refresh)
- Why cookies for Next.js? (User is logged out after page refresh)
- Why do emails reach me but not my users? (Supabase confirmation, magic link or password reset emails not sending)
- Can I just raise the default rate limit? (Supabase confirmation, magic link or password reset emails not sending)
- Is there a free option? (Supabase confirmation, magic link or password reset emails not sending)
- The email arrives but the link opens localhost. (Supabase confirmation, magic link or password reset emails not sending)
- Do I need all three: SPF, DKIM and DMARC? (App emails (sign-up, password reset, receipts) land in spam: fix SPF, DKIM and DMARC)
- Can I send from my @gmail.com address through Resend or SendGrid? (App emails (sign-up, password reset, receipts) land in spam: fix SPF, DKIM and DMARC)
- Everything shows PASS but it still goes to spam. (App emails (sign-up, password reset, receipts) land in spam: fix SPF, DKIM and DMARC)
- Should I set DMARC to p=reject straight away? (App emails (sign-up, password reset, receipts) land in spam: fix SPF, DKIM and DMARC)
- Is this why my Supabase confirmation emails never arrive? (App emails (sign-up, password reset, receipts) land in spam: fix SPF, DKIM and DMARC)
- Am I affected if I do not have an Expo app? (Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover)
- Is upgrading enough? (Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover)
- Will rotating the secret log my users out? (Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover)
- My app is on Vercel. Am I already protected? (Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover)
- Which versions are patched? (Better Auth security release (Nov 2026): upgrade to 1.7.16 to stop Expo account takeover)
- Is hiding the admin button or route enough to protect my admin page? (Admin page is hidden but not protected (anyone can open /admin or call admin APIs))
- How do I check if my admin page is really protected? (Admin page is hidden but not protected (anyone can open /admin or call admin APIs))
- Where should I store the admin role in Supabase? (Admin page is hidden but not protected (anyone can open /admin or call admin APIs))
- Is Next.js middleware enough to protect /admin? (Admin page is hidden but not protected (anyone can open /admin or call admin APIs))
- My admin page says 'not authorized' to normal users. Am I safe? (Admin page is hidden but not protected (anyone can open /admin or call admin APIs))
- Is a demo account in my app always a problem? (Demo login, auto-login or hard-coded test credentials left in your live app)
- I removed the code. Is the test account still a risk? (Demo login, auto-login or hard-coded test credentials left in your live app)
- Does if (import.meta.env.DEV) keep my dev login out of production? (Demo login, auto-login or hard-coded test credentials left in your live app)
- Can people really see passwords in my front-end code? (Demo login, auto-login or hard-coded test credentials left in your live app)
- Is it enough to delete the password from my GitHub repo? (Demo login, auto-login or hard-coded test credentials left in your live app)
- Why doesn't a per-email login limit stop credential stuffing? (Login rate limit only counts per email: credential stuffing gets through)
- Does Supabase rate limit password sign-ins? (Login rate limit only counts per email: credential stuffing gets through)
- Why do all my users get over_request_rate_limit at once? (Login rate limit only counts per email: credential stuffing gets through)
- Should I lock accounts after 5 failed logins? (Login rate limit only counts per email: credential stuffing gets through)
- Is leaked password protection free on Supabase? (Login rate limit only counts per email: credential stuffing gets through)
- Doesn't verify_jwt mean only logged-in users can call my Edge Function? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
- Is the Supabase anon key a JWT? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
- How do I make an Edge Function only work for signed-in users? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
- Can someone call my Edge Function from outside my app? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
- Should I turn verify_jwt off? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
- Why was my OpenAI or email Edge Function spammed? (Supabase Edge Function callable by anyone (the anon key passes verify_jwt))
Payments
- Which secret do I use locally? (Stripe webhook: No signatures found matching the expected signature)
- Test vs live? (Stripe webhook: No signatures found matching the expected signature)
- Can I trust the success URL? (Payment succeeds but the user isn't upgraded)
- Payment Links? (Payment succeeds but the user isn't upgraded)
- Can I copy test products to live? (No such price / No such customer (test vs live mode mix-up))
- Is it a code bug? (No such price / No such customer (test vs live mode mix-up))
- Is it a Stripe bug that events arrive twice? (Stripe webhook runs twice: duplicate orders, credits or double charges)
- Webhook duplicates vs real double charges? (Stripe webhook runs twice: duplicate orders, credits or double charges)
- How do I test it? (Stripe webhook runs twice: duplicate orders, credits or double charges)
- Isn't Stripe Checkout secure already? (Users can change the price at checkout: stop trusting amounts sent from the browser to Stripe)
- Can I just validate the amount on the server? (Users can change the price at checkout: stop trusting amounts sent from the browser to Stripe)
- What about pay-what-you-want or donations? (Users can change the price at checkout: stop trusting amounts sent from the browser to Stripe)
- How do I know if someone already did this? (Users can change the price at checkout: stop trusting amounts sent from the browser to Stripe)
- Can't I just check the session_id on the success page? (Visiting the success page unlocks Pro without paying: grant access from the Stripe webhook, not the redirect)
- Why does it work in my testing but not for real customers? (Visiting the success page unlocks Pro without paying: grant access from the Stripe webhook, not the redirect)
- Will the webhook arrive before the success page loads? (Visiting the success page unlocks Pro without paying: grant access from the Stripe webhook, not the redirect)
- Do I need the webhook for one-time payments too? (Visiting the success page unlocks Pro without paying: grant access from the Stripe webhook, not the redirect)
- Will Stripe disable my endpoint? (Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it)
- Does re-enabling replay missed events? (Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it)
- How long does Stripe keep retrying? (Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it)
- Why did it work in test and fail in live? (Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it)
- Is returning 200 for every request safe? (Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it)
- Why does my Stripe webhook get 401 from Supabase? (Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT))
- Is it safe to set verify_jwt = false? (Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT))
- Can I add my anon or service_role key to the Stripe webhook instead? (Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT))
- Will I lose the payments that failed while it returned 401? (Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT))
- I turned it off but still get 401. Why? (Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT))
Deploys
- Can I set ignoreBuildErrors? (Vercel build fails: Type error / ESLint errors (works locally))
- Why does casing matter? (Vercel build fails: Type error / ESLint errors (works locally))
- Why does the home page work? (404 NOT_FOUND when refreshing a page (React/Vite SPA))
- Will this break API routes? (404 NOT_FOUND when refreshing a page (React/Vite SPA))
- Why does it work in Postman? (CORS error: blocked by CORS policy: No 'Access-Control-Allow-Origin' header)
- Can I use Access-Control-Allow-Origin: *? (CORS error: blocked by CORS policy: No 'Access-Control-Allow-Origin' header)
- Why does it work in the workspace? (Replit deploy: app not reachable / port not open)
- Where do env vars go? (Replit deploy: app not reachable / port not open)
- Is suppressHydrationWarning a fix? (Hydration failed because the server rendered HTML didn't match the client)
- Could an extension cause it? (Hydration failed because the server rendered HTML didn't match the client)
- How long should Verifying take? (Lovable custom domain stuck on Verifying, SSL failing, or login broken after the switch)
- Do I need to buy an SSL certificate from my registrar? (Lovable custom domain stuck on Verifying, SSL failing, or login broken after the switch)
- My domain shows my old website. (Lovable custom domain stuck on Verifying, SSL failing, or login broken after the switch)
- Why does login work on lovable.app but not my domain? (Lovable custom domain stuck on Verifying, SSL failing, or login broken after the switch)
- Do custom domains need a paid plan? (Lovable custom domain stuck on Verifying, SSL failing, or login broken after the switch)
- Why does the preview work if production doesn't? (App works on localhost but breaks in production: a checklist to find the cause)
- I added the environment variable and it still says undefined. (App works on localhost but breaks in production: a checklist to find the cause)
- The browser just says 500 or 'Internal Server Error'. (App works on localhost but breaks in production: a checklist to find the cause)
- Should I just copy my whole .env into production? (App works on localhost but breaks in production: a checklist to find the cause)
- Why does my security scan say my vibe-coded app is missing a Content-Security-Policy? (Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app)
- Which security headers should I add first? (Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app)
- Do I need to add Strict-Transport-Security (HSTS) on Vercel? (Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app)
- I added a CSP and now my app is blank. What happened? (Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app)
- Can I set a CSP with a meta tag instead of a header? (Missing security headers (CSP, X-Frame-Options, nosniff) on a Vercel or Netlify app)
- What does 502 Bad Gateway mean on a Replit app? (Replit app shows 502 Bad Gateway after republishing (or publish fails at the last step))
- Why does my Replit app work in Preview but not when published? (Replit app shows 502 Bad Gateway after republishing (or publish fails at the last step))
- Why does Replit publishing fail at the last step? (Replit app shows 502 Bad Gateway after republishing (or publish fails at the last step))
- Can I roll back a Replit deployment to the previous version? (Replit app shows 502 Bad Gateway after republishing (or publish fails at the last step))
- Could the 502 be Replit's fault? (Replit app shows 502 Bad Gateway after republishing (or publish fails at the last step))
Database / Supabase RLS
- Should I just turn RLS off? (Supabase query returns an empty array (no error))
- Why does it work in the SQL editor? (Supabase query returns an empty array (no error))
- Can I use the service_role key in the browser to bypass this? (new row violates row-level security policy for table)
- What is WITH CHECK? (new row violates row-level security policy for table)
- Where are the logs? (Supabase Edge Function fails with CORS or 'Failed to send a request')
- Does it need my anon key? (Supabase Edge Function fails with CORS or 'Failed to send a request')
- The bucket is public, why 403? (Supabase Storage upload fails: new row violates row-level security policy (403))
- How do I restrict to own folder? (Supabase Storage upload fails: new row violates row-level security policy (403))
- The table is in my code / types. Why fail? (Postgres error: relation "public.xyz" does not exist)
- It works for my teammate. (Postgres error: relation "public.xyz" does not exist)
- My old tables still work. Why only this one? (Supabase "permission denied for table" (42501) on a new table)
- I'm using the service role key and it still fails. (Supabase "permission denied for table" (42501) on a new table)
- Is this the same as 'new row violates row-level security policy'? (Supabase "permission denied for table" (42501) on a new table)
- Does this affect direct Postgres connections? (Supabase "permission denied for table" (42501) on a new table)
- Is the anon key the problem? (Supabase table has RLS disabled (public Data API access))
- Will enabling RLS break my app? (Supabase table has RLS disabled (public Data API access))
- Why is there no error? (Supabase update says saved but the change is gone after refresh)
- I added an UPDATE policy and it still doesn't save. (Supabase update says saved but the change is gone after refresh)
- Inserts work, so why not updates? (Supabase update says saved but the change is gone after refresh)
- Is the service role key a fix? (Supabase update says saved but the change is gone after refresh)
- RLS is enabled, so why can other users see my data? (Supabase RLS is on but every user can read every row: fix USING (true) and auth.uid() is not null policies)
- Isn't TO authenticated enough to keep strangers out? (Supabase RLS is on but every user can read every row: fix USING (true) and auth.uid() is not null policies)
- Why did my owner-only policy not help? (Supabase RLS is on but every user can read every row: fix USING (true) and auth.uid() is not null policies)
- Is USING (true) ever fine? (Supabase RLS is on but every user can read every row: fix USING (true) and auth.uid() is not null policies)
- What does 'Edge Function returned a non-2xx status code' actually mean? (Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it))
- Why does it work when I test the function in the Supabase dashboard? (Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it))
- Should I just turn off JWT verification to make the 401 go away? (Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it))
- Is this the same as the CORS error? (Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it))
- Why does my AI builder keep failing to fix it? (Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it))
- How long until a free Supabase project pauses? (Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back)
- Will I lose my data when the project is paused? (Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back)
- Is it 90 days or 1 year to restore? (Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back)
- Can a keep-alive ping stop the pause? (Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back)
- Why does my AI builder say the Supabase code is broken? (Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back)
- What does PGRST116 mean in Supabase? (Supabase .single() error PGRST116: JSON object requested, multiple (or no) rows returned)
- Should I use .single() or .maybeSingle()? (Supabase .single() error PGRST116: JSON object requested, multiple (or no) rows returned)
- The row is in the Table Editor, so why does .single() find 0 rows? (Supabase .single() error PGRST116: JSON object requested, multiple (or no) rows returned)
- Why did my message change to 'Cannot coerce the result to a single JSON object'? (Supabase .single() error PGRST116: JSON object requested, multiple (or no) rows returned)
- Why does insert().select().single() give a row-level security error instead? (Supabase .single() error PGRST116: JSON object requested, multiple (or no) rows returned)
- Why do AI coding tools disable RLS? (AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely)
- Is it ever OK to use the service_role or secret key? (AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely)
- What is Security Advisor 0007 policy_exists_rls_disabled? (AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely)
- Will turning RLS back on break my app? (AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely)
- My sb_secret_ key returns 401 in the browser. Is that a bug? (AI "fixed" my Supabase error by disabling RLS or using the service_role key: how to undo it safely)
- Does a Replit checkpoint rollback restore my database? (Replit rollback did not bring my data back: how to restore the development or production database)
- How do I restore my Replit production database? (Replit rollback did not bring my data back: how to restore the development or production database)
- I rolled back the code and republished. Why is the live data still wrong? (Replit rollback did not bring my data back: how to restore the development or production database)
- Can the Replit Agent delete my production data? (Replit rollback did not bring my data back: how to restore the development or production database)
- My Replit app uses Supabase. Will a rollback restore it? (Replit rollback did not bring my data back: how to restore the development or production database)
- Why does my view ignore Row Level Security? (Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view)
- What does security_invoker = true do? (Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view)
- After adding security_invoker my view returns no rows. Why? (Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view)
- Can I protect a materialized view with RLS? (Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view)
- Is a view on auth.users ever safe? (Supabase view shows every user's data even with RLS on: fix Security Advisor 0010 security_definer_view)
- Why can a user change their own role if RLS is on? (Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column)
- Can WITH CHECK stop a user changing their role? (Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column)
- How do I stop users updating one column in Supabase? (Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column)
- Where should I store user roles in Supabase? (Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column)
- Will my server and Stripe webhook still be able to set the plan? (Any user can make themselves admin or Pro: Supabase RLS lets users update their own role, plan or is_admin column)
- How many Lovable apps were leaking data? (Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study)
- Was Lovable or Supabase hacked? (Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study)
- How do I check if my Lovable app exposes data without login? (Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study)
- Is the Lovable security scan enough? (Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study)
- Is it a problem that my Supabase key is visible in the browser? (Is my Lovable app leaking data without login? A Supabase RLS audit checklist after the Crissy Field study)
- Why does my Supabase file link say Bucket not found when the bucket exists? (Supabase Storage file links broken: private bucket, getPublicUrl and expired signed URLs)
- Why do my Supabase signed URLs stop working? (Supabase Storage file links broken: private bucket, getPublicUrl and expired signed URLs)
- Should I just make my Supabase Storage bucket public? (Supabase Storage file links broken: private bucket, getPublicUrl and expired signed URLs)
- Why does createSignedUrl return Object not found? (Supabase Storage file links broken: private bucket, getPublicUrl and expired signed URLs)
- Can I cancel a signed URL I already shared? (Supabase Storage file links broken: private bucket, getPublicUrl and expired signed URLs)
- What is an IDOR in a web app? (Changing the id in the URL shows other users' data (IDOR))
- Do random UUIDs stop IDOR? (Changing the id in the URL shows other users' data (IDOR))
- Is .eq('user_id', user.id) in my Supabase query enough? (Changing the id in the URL shows other users' data (IDOR))
- Why does my API route return any user's record even with RLS on? (Changing the id in the URL shows other users' data (IDOR))
- Should I return 403 or 404 when a user requests someone else's record? (Changing the id in the URL shows other users' data (IDOR))
- How do I test my app for IDOR? (Changing the id in the URL shows other users' data (IDOR))
- Why does Supabase only return 1,000 rows? (Supabase only returns 1,000 rows (max rows limit))
- Why doesn't .limit(5000) return 5,000 rows from Supabase? (Supabase only returns 1,000 rows (max rows limit))
- How do I get the total row count in Supabase? (Supabase only returns 1,000 rows (max rows limit))
- Should I just increase Max rows in Supabase? (Supabase only returns 1,000 rows (max rows limit))
- Does the 1,000 row limit apply to rpc functions? (Supabase only returns 1,000 rows (max rows limit))
- Why do my paginated Supabase results repeat or skip rows? (Supabase only returns 1,000 rows (max rows limit))
Env vars & leaked keys
- Is the anon key safe to expose? (Supabase service_role key exposed in frontend code)
- I already deployed it. What now? (Supabase service_role key exposed in frontend code)
- Does a .env file hide it? (OpenAI / Stripe secret key leaked in the browser)
- Is the Stripe publishable key okay to expose? (OpenAI / Stripe secret key leaked in the browser)
- Why does it work locally? (Environment variable is undefined in production)
- Do I need to redeploy? (Environment variable is undefined in production)
- Does 429 always mean rate limiting? (OpenAI 429 'You exceeded your current quota' or a surprise AI bill)
- Should I set a budget? (OpenAI 429 'You exceeded your current quota' or a surprise AI bill)
- Is deleting the file enough? (.env file committed to GitHub)
- Private repo? (.env file committed to GitHub)
- Should I pay the person who reported it? (Someone reported a security hole in my vibe-coded app: what to do first)
- Is it really a hole if they only used my public anon key? (Someone reported a security hole in my vibe-coded app: what to do first)
- Do I need to tell my users? (Someone reported a security hole in my vibe-coded app: what to do first)
- How do I stop this happening again? (Someone reported a security hole in my vibe-coded app: what to do first)
- My keys are in environment variables, so how can they leak? (Your API error response shows your secret key: stop sending raw backend errors to the browser)
- Is showing err.message safe? (Your API error response shows your secret key: stop sending raw backend errors to the browser)
- Do I really need to rotate the key if it only showed in an error? (Your API error response shows your secret key: stop sending raw backend errors to the browser)
- How do I still debug production errors? (Your API error response shows your secret key: stop sending raw backend errors to the browser)
- Is it enough to delete the key from my code or repo? (Your API keys may have leaked: how to rotate every key without breaking your app)
- Will rotating keys break my app? (Your API keys may have leaked: how to rotate every key without breaking your app)
- Do I need to rotate the Supabase anon or publishable key? (Your API keys may have leaked: how to rotate every key without breaking your app)
- A platform I use was breached but my key isn't in the news. Should I still rotate? (Your API keys may have leaked: how to rotate every key without breaking your app)
Performance
- Do I need a bigger plan? (Postgres: too many connections / remaining connection slots are reserved)
- Why separate DIRECT_URL? (Postgres: too many connections / remaining connection slots are reserved)
- How do I spot it? (App is slow: dozens of database calls per page (N+1 queries))
- Do indexes help with RLS? (App is slow: dozens of database calls per page (N+1 queries))
- Can it cost me money? (Too many re-renders / useEffect infinite loop)
- Should I disable the lint rule? (Too many re-renders / useEffect infinite loop)
Get one new fix a week
Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.
We only use your email to send the newsletter. Unsubscribe any time. See privacy.