The code returns the following error:
Your project's URL and Key are required to create a Supabase client!
Check your Supabase project's API settings to find these values
https://supabase.com/dashboard/project/_/settings/api
at be (@supabase/ssr)
at updateSession (/lib/supabase/middleware)
at Object.proxy [as handler] (/proxy)
Revise the code to address the error.
I was previewing: /
Now I understand the issue. The middleware and client are trying to use Supabase without checking if the environment variables exist. Since the user chose to use mock data, I need to add a fallback that bypasses Supabase auth when credentials are not set:
Now I have all the context I need. Let me update the server client and auth actions to support mock authentication:
I've updated the Supabase client files and auth actions to support mock authentication when Supabase credentials are not configured. The middleware now checks for a mock-auth cookie, and the login action validates against the test credentials (a1ibekdew0@gmail.com / alibek20999). When real Supabase credentials are added, the system automatically switches to real authentication.
I detected and automatically synced new changes from main in v0-restaurant-ordering-system.