Guide · v0 by Vercel · Updated
Is My v0 App Secure? How to Check Your Live v0 App Before You Launch
v0 can turn a prompt into a Next.js app and publish it to Vercel in one click. Before real people use it, check two things on the live URL: which keys your site gives away, and who can read your data. Here is what v0 and Vercel say, and how to check your live app yourself for free.
1. The short answer
A v0 app is only as safe as where its keys live and what its live URL exposes. The big risks are:
- Secret keys in a
NEXT_PUBLIC_variable, so they end up in the code every visitor downloads. - Supabase or Neon tables that anyone can read or change, because Row Level Security is off or a rule is too open.
- Server Actions or API routes that change data without checking who called them.
- Preview deployments that are public when you thought only your team could open them.
v0 and Vercel give you the tools. You still need to check the live app from the outside, because that is what a stranger sees.
2. How v0 handles keys and deploys
A few facts from v0's own docs (all linked at the bottom of this section):
- v0 defaults to Next.js, with Server Actions and API routes for backend work.
- You add keys under Project menu → Settings → Environment Variables. You can scope a variable to Production, Preview or Development. The v0 preview only sees variables available in Development.
- Client-side variables must be prefixed with
NEXT_PUBLIC_. v0's security docs say variables without that prefix stay on the server, and onlyNEXT_PUBLIC_ones are exposed to the browser. They also say: never put a sensitive token in aNEXT_PUBLIC_name. - v0 can warn about risky
NEXT_PUBLIC_use and move calls into Route Handlers or Server Actions. - Databases come from the Vercel Marketplace: Supabase, Neon, Upstash and Vercel Blob are listed in v0's databases docs. Integrations sync env vars into your Vercel project.
- Publish deploys to Vercel. Working branches get preview URLs; Publish updates the stable production URL. First publish asks you to choose visibility. Advanced settings (Deployment Protection, env vars) live on the linked Vercel project.
Sources: v0: Security · v0: Full-stack apps · v0: External APIs · v0: Databases · v0: Deployments
3. The 5-minute check on your live v0 app
Only check apps you own or have permission to test. Use your production URL (and any preview URL you share with strangers).
Step 1: Search your live code for secret keys
Open the published app in Chrome. Right-click and pick Inspect. Press Ctrl+Shift+F (Cmd+Option+F on a Mac) to search all loaded files. Search for:
sk-andsk-ant-(OpenAI and Anthropic)sk_liveandrk_live(Stripe secret keys)service_role,sb_secret_andSUPABASE_SECRET(database keys that skip table rules)AKIAandBEGIN PRIVATE KEY(AWS and other secrets)NEXT_PUBLIC_next to any of the above. That means a secret was built into the browser bundle
Click through login and settings first, since some code only loads on those pages. A Stripe key that starts with pk_ is meant to be public. Not sure which keys are secret? See How to check if your API key is exposed.
Step 2: Watch where your app sends requests
Open the Network tab and reload. Use the parts of your app that save data, use AI or take payments. Two things to look for:
- Calls straight to a paid API, like
api.openai.com, withAuthorization: Bearer sk-…in the headers. That means your secret key is public. It should be a Server Action or Route Handler instead. - Calls to your database. If your app uses Supabase, these go to an address ending in
supabase.co. Seeing the publishable or anon key is normal. Your table rules are what protect you.
Step 3: Try to read your tables while logged out
If your app's database calls go to supabase.co, you can test each table from a terminal. Swap in your project URL, a table name and the public key from Step 2:
curl "https://YOUR-PROJECT.supabase.co/rest/v1/TABLE_NAME?select=*&limit=1" \ -H "apikey: YOUR_PUBLIC_KEY"
- You see a row of real data: anyone can read this table. Fix it first, unless it is meant to be public, like blog posts.
- You see
[]: no rows came back. Your rules may be blocking logged-out visitors, or the table may be empty. - You see error
42501or "permission denied": logged-out visitors can't reach this table. That is usually good for private tables.
For more on these results, see Is my Lovable app safe? It works the same way for any app on Supabase, including ones built in v0.
Step 4: Test with two accounts
If your app has sign-in, make two test accounts. Add some data as the first one. Log in as the second one and try to see or change it. Try the page links too, like changing an id in the address bar. If account two can see account one's data, your rules or Server Actions are too open.
Step 5: Check preview URLs and Deployment Protection
Open your Vercel project → Settings → Deployment Protection. Confirm whether preview URLs need a Vercel login. Open a private window and visit a recent *.vercel.app preview link. If it loads with no login, anyone with the link can use it, including any test data or keys on that preview.
Step 6: Try /.env and check your title
In a private window, go to yourapp.com/.env and yourapp.com/.git/config. You should get a "not found" page or your normal app page. Then view the page source and check the <title> and meta description. If they still say something like "Create Next App" or are empty, fix them before you share the link.
4. NEXT_PUBLIC_ and secret keys
Next.js docs say it "inlines" any NEXT_PUBLIC_ value into the JavaScript sent to the browser at build time. After the build, that value is frozen in the bundle. v0's security page says the same split: no prefix = server only; NEXT_PUBLIC_ = browser.
- Secret keys go in env vars without
NEXT_PUBLIC_, and only a Server Action or Route Handler uses them. - Never paste a secret into chat as part of the code or into a client component.
- Scope keys by environment in Project Settings → Environment Variables (Production / Preview / Development), as v0's External APIs docs describe.
- If a key was ever public, make a new one and turn off the old one. Removing it from your code is not enough.
Sources: v0: Security · v0: External APIs · Next.js: Environment variables
5. Supabase, Neon and open tables
v0's databases docs list one-click integrations with Supabase, Neon, Upstash and Vercel Blob. The Supabase Marketplace docs say a connected project syncs variables including:
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY(browser-safe)SUPABASE_SECRET_KEY(server only, skips Row Level Security)- Postgres connection strings like
POSTGRES_URLandPOSTGRES_PASSWORD(server only)
Older projects may still show NEXT_PUBLIC_SUPABASE_ANON_KEY and SUPABASE_SERVICE_ROLE_KEY. Same rule: the publishable/anon key is public; the secret/service_role key must never appear in browser code. Vercel's rotate-secrets guide says the service_role key bypasses every RLS policy, so treat a leak as urgent and make a new key.
Neon apps usually talk to Postgres through a server-side DATABASE_URL. If that URL or password shows up in your live JavaScript, move the query to a Server Action and rotate the password.
RLS tip: turning RLS on is not enough if a policy says "allow all". Check each table while logged out (Step 3 above).
Sources: v0: Databases · Supabase: Vercel Marketplace · Vercel: Rotating Supabase secrets
6. Server Actions and API routes
v0 likes Server Actions and app/api Route Handlers for backend work. Next.js data-security docs warn that:
- An exported Server Action can be called with a direct POST, not only from your UI.
- A login check on the page does not protect the actions on that page. Check auth again inside each action.
- Also check ownership (can this user change this row?), not only "are they logged in?".
- Only return what the UI needs. Do not send whole database rows back to the browser.
When you ask v0 to "add auth", also ask it to put the check inside every Server Action and API route that touches private data.
Sources: Next.js: Data security · v0: Full-stack apps
7. Preview URLs and Deployment Protection
v0 creates preview deployments for working branches and a stable production URL when you Publish. Vercel's "locking down deployments" guide says:
- No v0 chat is deployed until you actively share or publish it.
- Once deployed to Vercel, the project's Deployment Protection settings apply.
- Deployments that are not locked down and that use a
*.vercel.appdomain are public and can be indexed by search engines.
Vercel Authentication (under Project Settings → Deployment Protection) can protect preview URLs so only your team (or people you approve) can open them. Standard Protection covers previews; All Deployments also locks production. Shareable links and automation bypass exist when you need a controlled exception.
If you pasted a preview link in a public Discord or tweet, treat that preview like production: no secret keys, no real customer data.
Sources: v0: Deployments · Vercel: Deployment Protection · Vercel: Locking down deployments
8. Security headers, title and broken links
These do not stop a leaked key, but they catch easy launch mistakes:
- Security headers. Next.js lets you set headers in
next.config. Useful ones: Content-Security-Policy (at leastframe-ancestors 'none'), X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and HSTS. Check your live response headers in the Network tab. - Title and description. Empty or default titles hurt sharing and search. Set both on the home page before you launch.
- Broken links. Click every main nav and footer link on the live site, or let a checker crawl the home page.
Source: Next.js: headers
9. Copy-paste fix prompts for v0
Paste one into the v0 chat. After each fix, publish again and repeat the live check.
Find every secret API key in my project, like OpenAI, Anthropic, Stripe secret keys (sk_ or rk_), Supabase secret or service_role keys, and any database password. Move each call that uses one into a Server Action or Route Handler. Store each key in an environment variable that does NOT start with NEXT_PUBLIC_. Remove any NEXT_PUBLIC_ variable that holds a secret. Then list every key you moved so I can make a new one.
Review every Supabase table my app uses. Turn on Row Level Security for each one. Add policies so a signed-in user can only read and change their own rows. Public content like blog posts can stay readable. Contact forms and waitlists must not be readable by anyone. Show me the policies you added.
List every Server Action and every app/api Route Handler. For each one that reads or changes private data, add an auth check inside the handler (not only on the page). Also check that the signed-in user owns the row they are changing. Reject requests that fail. Show me what you changed.
Add security headers in next.config for my Next.js app: Content-Security-Policy with frame-ancestors none, X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy strict-origin-when-cross-origin, and Strict-Transport-Security. Keep the CSP compatible with my app. Show the config change.
Set a clear page title and meta description on my home page (not the Next.js or v0 default). Add an Open Graph title and description. Crawl the home page for broken internal links and fix or remove them. List every change.
10. Check it for me
Don't want to do this by hand after every publish? VibeCheck checks your live app from the outside, the way a stranger would. It searches the JavaScript your homepage loads for secret keys. If your app talks to Supabase from the browser, it checks common table names to see if they are open. It also checks security headers, Google basics like your title and sitemap, and broken links.
It works with any public link: your vercel.app address, your own domain, or a preview URL that is not locked down. It only looks. It never logs in, fills in forms or tries to break in. If it finds an open table, it notes the table name and never stores the rows.
It is a good partner to v0: v0 builds and deploys from the inside, and VibeCheck looks at the live site from the outside.
Pricing: the problems list is free (just add your email). A fix report with a copy-paste prompt for every problem is $9. Or get 10 fix reports for $29. No subscription.
No tool can promise your app is safe. VibeCheck catches common, costly mistakes so you can fix them first.
11. FAQ
Is my v0 app secure?
It can be, but you have to check the live app. v0 builds Next.js apps and deploys them to Vercel. The common problems are secret keys put in NEXT_PUBLIC_ variables (which go to the browser), Supabase or Neon tables that anyone can read, Server Actions or API routes with no auth check, and preview URLs that are public when you thought they were private.
What does NEXT_PUBLIC_ mean in a v0 app?
v0 defaults to Next.js. Next.js docs say any env var that starts with NEXT_PUBLIC_ is inlined into the JavaScript every visitor downloads. v0's own security docs say the same: only NEXT_PUBLIC_ vars are exposed to the browser, and you should never put a sensitive token there. Use a name without that prefix, and call it from a Server Action or Route Handler.
Are my preview deployments private?
Not always. Vercel's guide on locking down deployments says that deployments that are not locked down and that use a vercel.app URL are public and can be indexed. v0's publish flow lets you choose visibility, and Vercel Deployment Protection (Vercel Authentication) can lock previews so only your team can open them. Check Project Settings → Deployment Protection on the linked Vercel project.
Is the Supabase key from the Vercel Marketplace safe in my frontend?
The publishable one is meant to be public. The Supabase Marketplace docs sync NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY (or the older anon names) for the browser, plus SUPABASE_SECRET_KEY (or the older service_role key) for the server. The secret key skips Row Level Security. Keep it on the server only. Your table rules still protect public data.
Do Server Actions need their own login check?
Yes. Next.js data-security docs say a page-level auth check does not protect the Server Actions on that page. Each action can be called with a direct POST, so you must check who the caller is inside the action, and check that they own the row they are changing.
My app looks fine in v0. Do I still need to check?
Check the live production URL and any public preview URLs. v0 helps you build and deploy; strangers only see what is live. After every publish, search the live site for secret keys, try to read your tables while logged out, and confirm Deployment Protection is set the way you want.
More questions? See the VibeCheck FAQ. Also useful: Is my Cursor app secure? · Is my Replit app secure? · Is my Bolt app secure? · Is my Lovable app safe? · Supabase RLS check · Is my API key exposed?. Before you launch, run the vibe coding security checklist (12 checks for any AI-built app). Scan says "No Content-Security-Policy"? See how to add security headers.