App Finishers

Fix guide · updated 2026-11-07

Supabase "requested path is invalid": what it means and the fix

{"error":"requested path is invalid"}

A user clicks Confirm your email, or signs in with Google, Apple or X, and lands on a page that only says {"error":"requested path is invalid"}. Or an upload or a database call in your app fails with the same words. It looks cryptic, but it always means the same thing: something sent the browser, or your code, to an address on your Supabase project that doesn't exist. Find what sent it there, and the fix takes a few minutes.

What the error means

Your Supabase project lives at an address like https://abcdefghijklmnopqrst.supabase.co. That's your backend, not a website: it only answers specific paths such as /auth/v1/…, /rest/v1/… and /storage/v1/…. Open the bare address, or a path that doesn't exist, and Supabase answers with this error. So look at the address bar when it happens:

1. Logins and email links land on your Supabase address

Supabase has two addresses that are easy to mix up:

If the Site URL holds the Project URL, every confirmation link and every login ends on this error. Fix it in three steps:

  1. Site URL: put your app's live address. Save.
  2. Redirect URLs, on the same page: add every address users should come back to, ending with /**, for example https://yourapp.com/**.
  3. Your code: tell Supabase to send people back to your app, never to Supabase.
// Email sign-up: where the confirmation link sends people
await supabase.auth.signUp({
  email,
  password,
  options: { emailRedirectTo: `${window.location.origin}/` },
});

// Google, Apple, X…
await supabase.auth.signInWithOAuth({
  provider: "google",
  options: { redirectTo: `${window.location.origin}/` },
});

A common trap: putting https://…supabase.co/auth/v1/callback in redirectTo. That callback address belongs in Google's, Apple's or X's developer console. In your code, redirectTo must point back to your app.

Then send yourself a new confirmation email to test. Links in emails sent before the fix keep the old address.

2. Only X (Twitter), Apple or Google login fails

When the step at the provider fails, Supabase sends the user back to your app's address with the reason attached. If that address is wrong, you get this message instead of the real error. Look at the address bar anyway: the real reason is often written there, after error_description=. Fix section 1 first, then check two things:

3. Your code gets the error from an upload or a query

Check the Supabase address your app uses. It must be exactly the Project URL, with nothing after .supabase.co: the Supabase library adds /rest/v1, /storage/v1 and the rest by itself, so anything extra ends up in front of every request. One case gives a different message: with /rest/v1 at the end of the address (the API URL shown on Project Settings → Data API), requests reach the database API and fail with "Invalid path specified in request URL" instead, sign-up and login included. See that guide.

If your project runs on Lovable Cloud rather than your own Supabase project, the same settings exist there: look in its authentication settings for the site and redirect addresses.

Still stuck?

Supabase → Authentication → Logs shows each login attempt and where Supabase tried to send the user. If users now land on localhost instead, see our guide on Supabase login redirecting to localhost.

Other Supabase problems? See Supabase fixes.