◉RORK LABJP
●ANIMATE — Rork can now animate a 3D model of a four-legged animal with 127 ready-made animations (12/2)●FLASH END — Intro pricing for the Gemini Flash models behind your AI features ends on 12/31, 27 days from now●ROUTER — Since expo-router 58.0.32, a reused screen can keep an old param even after it is set to undefined, users report●PODFILE — Once you ship several apps, settle iOS dependency rules early: minimum version, source and pinned versions●ENV — If an eas.json variable is missing during prebuild, check at which stage the value is passed in●COST — Lay out Apple and Google developer fees plus your Rork plan per year to see the real cost of shipping●ANIMATE — Rork can now animate a 3D model of a four-legged animal with 127 ready-made animations (12/2)●FLASH END — Intro pricing for the Gemini Flash models behind your AI features ends on 12/31, 27 days from now●ROUTER — Since expo-router 58.0.32, a reused screen can keep an old param even after it is set to undefined, users report●PODFILE — Once you ship several apps, settle iOS dependency rules early: minimum version, source and pinned versions●ENV — If an eas.json variable is missing during prebuild, check at which stage the value is passed in●COST — Lay out Apple and Google developer fees plus your Rork plan per year to see the real cost of shipping
Articles/AI Models
◉ AI Models/2026-10-20Beginner

Before You Type "Connect Supabase": The Two Values to Copy, and the One You Must Not

Rork asks for just two things before you type Connect Supabase in chat: a Publishable key and your project link. Here is where to copy them from, how to avoid pasting the secret key that sits on the same screen, and a small script that checks the values locally first.

Rork622Supabase41Publishable keyGetting Started3Backend6

As an indie developer who runs wallpaper apps, I once sat with the Supabase dashboard open, half-way through typing "Connect Supabase" into Rork's chat box, and stopped. The screen showed several keys in a row, and I could not tell which one was meant.

Rork's own docs keep the steps short. Create a new project in Supabase, copy the Publishable key and the project link, then paste both into the chat along with "Connect Supabase." That's all. The "copy" part is left to screenshots, though, so the page never says in words which string it means.

What follows is the preparation I'd do before pasting. Two values are safe to paste, and one is not. Knowing that in advance means you won't have to decide in the second before you hit enter.

You only need two values

Rork's docs ask for these:

ValueWhat it looks likeSafe to paste?
Project URL (the docs call it the project link)An address shaped like (letters and digits).supabase.coYes
Publishable keystarts with sb_publishable_Yes
Secret keystarts with sb_secret_No

According to Supabase's documentation, the Publishable key is a low-privilege key that is "safe to expose online" in web pages, mobile apps, and source code. It is built on the assumption that Row Level Security decides what it can read and write.

The Secret key is a different animal. The same docs say it bypasses every Row Level Security policy you have, so it belongs only in backend code you control, such as servers or Edge Functions. It should never end up in a shipped app or in source control.

Rork's page says nothing about the Secret key at all. I read that as a reason to draw the line myself, rather than assuming silence means safety.

Where to copy them from

There are two places to look.

If you want the URL and the key side by side, use the Connect dialog in the Supabase dashboard. It shows the URL and the Publishable key for the framework you pick.

If you only need the key again, go to Settings > API Keys. Every key lives there, including the legacy ones. Look for the row named "Publishable key." A "Secret key" row usually sits right beside it, so I trace the row name with my finger before copying.

Legacy keys may still be on screen: anon (the old form of the Publishable key) and service_role (the old form of the Secret key). Both are long strings starting with eyJ, so you can't tell them apart by eye. Supabase's API keys documentation says they are scheduled for deprecation in early 2027 (checked against the official docs in December 2026), and creating the new keys does not disable the old ones. They stay valid until you turn them off in Settings > API Keys.

Check the shape before you paste

Because the legacy keys look identical, I let a script look for three seconds before I paste. It checks the URL's shape and the key type. For a legacy key it decodes the JWT payload and reads role, so it can tell anon from service_role.

It solves one narrow problem: mixing the values up at the last moment. It makes no network calls and only inspects the strings you hand it.

// check-supabase-values.mjs
// Checks locally whether your two values are safe to paste.
// Usage: node check-supabase-values.mjs "<Project URL>" "<key>"
const [url = "", key = ""] = process.argv.slice(2);
 
const problems = [];
 
// 1) Project URL: must look like https://<project-ref>.supabase.co
if (!/^https:\/\/[a-z0-9]+\.supabase\.co\/?$/.test(url.trim())) {
  problems.push("URL is not in the https://xxxx.supabase.co form (check for a trailing /rest/v1)");
}
 
// 2) Tell the key types apart
const k = key.trim();
if (k.startsWith("sb_publishable_")) {
  // safe to paste
} else if (k.startsWith("sb_secret_")) {
  problems.push("This key starts with sb_secret_. It must never go into the app");
} else if (k.startsWith("eyJ")) {
  // Legacy JWT: read the role inside to tell anon from service_role
  try {
    const payload = JSON.parse(Buffer.from(k.split(".")[1], "base64url").toString());
    if (payload.role === "service_role") {
      problems.push("This is a legacy service_role key. It must never go into the app");
    } else if (payload.role !== "anon") {
      problems.push(`Unexpected role=${payload.role}. Look for the Publishable key again`);
    }
  } catch {
    problems.push("Starts with eyJ but cannot be read as a key. Check that the copy was not cut off");
  }
} else {
  problems.push("Unknown key format. Copy the Publishable key again from Settings > API Keys");
}
 
if (problems.length) {
  console.log("Stop before pasting:\n- " + problems.join("\n- "));
  process.exit(1);
}
console.log("OK: this is a Project URL and a Publishable key. Safe to paste.");

I ran it on Node 22 with dummy strings. A sb_publishable_ key passes. A sb_secret_ key and a legacy key whose role is service_role both stop with exit code 1. So does a URL with /rest/v1 tacked on the end.

The reason it checks the URL shape is that the longer API address shown elsewhere is easy to copy by mistake. What you paste is the short form, from https:// through .supabase.co.

Two other ways to connect, and how to choose

Rereading Rork's documentation, I noticed it describes two more ways to connect besides copying and pasting values (checked on docs.rork.com in December 2026).

MethodWhat you doDo you handle keys?When it fits
Copy and pasteCreate a project, then paste the Publishable key and project link with "Connect Supabase"Yes (this article)You want to see exactly which values went in
Sign in from chatSend "Connect my own Supabase project to this app," sign in to Supabase, pick the organization and projectNoYou'd rather not copy keys at all. Each sign-in covers one organization
Terminalrork connect add supabase → rork supabase ls → rork supabase attach <ref>NoYou already live in Rork's CLI and like having the steps in your shell history

If I had to reduce the choice to one rule: if copying keys makes you nervous, pick a method that doesn't involve copying them. With the sign-in flow there is simply no Secret key to paste by mistake. The docs also note that a project in a different organization needs another sign-in, so if you juggle several organizations, check which one you're in first.

I still use copy and paste because I like having a written record of what went in. Neither is more correct; choose the one that's easier for you to verify.

The paste itself

When the values are ready, paste them into your Rork project's chat in one message, as the docs describe.

Connect Supabase
Project URL: https://(your-project).supabase.co
Publishable key: sb_publishable_(the string you copied)

After that, follow the setup instructions Rork gives you in the chat. From here Rork's reply leads, and I have little to add.

One more thing: if the backend runs under your own Supabase account, Supabase bills you directly. The docs also point to a Rork-hosted option. Deciding who sends the bill up front saves a surprise later.

If it doesn't connect

When data won't load after pasting, I'd suspect Row Level Security before the key. The Publishable key is low-privilege by design, so with no policies in place, getting nothing back is the correct behavior. Here is how I'd separate the usual symptoms.

SymptomLikely causeHow to checkFix
No error, but the list stays emptyRLS is on for the table and there's no read policyCount the RLS policies on that table in Supabase's Table EditorDecide who may read what, then add one read policy
401 responsesA mis-copied key (stray whitespace, truncated), or a Secret key used from a browserRun the same value through the script above. Supabase's docs say a Secret key used from a browser returns 401Copy the Publishable key again; rotate the Secret key if you pasted it
404 or "not found" errorsThe Project URL still ends in /rest/v1 or similarSee whether the script's URL check stopsTrim everything after .supabase.co
Worked in development, then stopped one dayYou were on the legacy anon key and disabled legacy keys in the dashboardCheck the legacy key status in Settings > API KeysSwitch to the Publishable key and rebuild
You see another project's dataYou picked the wrong organization or project when signing inCompare the ID in the Project URL with the project you meantReconnect and choose the right project

Two common misconceptions

The first is the worry that "the Publishable key is visible inside my app, so it must be dangerous." Supabase's documentation describes the Publishable key as safe to expose in web pages, mobile apps, and source code. What protects your data is not hiding the key but your Row Level Security policies. Time spent checking policies one by one buys more safety than time spent hiding the key.

The second is assuming that creating new keys automatically retires the old anon and service_role keys. The docs say the legacy keys keep working until you turn them off in the dashboard. Once you move to the new keys, make turning off the old ones part of the same task, so a value that may have leaked doesn't linger.

Where people usually get stuck next

Right after connecting, the question most people hit is where to keep keys for other external APIs. That is separate from the Supabase keys; I've covered it in environment variables versus a Supabase Edge Function. The other is billing: with your own Supabase account, Supabase bills you directly. If you'd like to see that alongside your other bills, your first year with Rork: the order your bills actually arrive in lays it out.

And if you realize you pasted a Secret key, rotate it in Settings > API Keys. A value that has once entered a chat or generated code can't be un-pasted just by deleting it.

Paste only the two values meant to be public; when in doubt, stop. I repeat that sentence to myself every time I handle keys.

Your next step is a small one: find the Publishable key row in Supabase, run it through the script above, and then paste.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

◉ AI Models2026-10-27
Sending temperature to the Claude API Now Returns a 400 on the New Version. Finding Every Spot in Your App
Claude API version 2026-10-21 returns a 400 if you send temperature, top_p or top_k, and newer models such as Sonnet 5.5 reject them even on the old version. A table of when the 400 hits, a scan script, and the order to fix things in.
◉ AI Models2026-10-25
Is Your Rork App Still Calling Sonnet 4.5? Finding Out Before November 30
Claude Sonnet 4.5 is scheduled to retire from the API on November 30, 2026. A small script to find leftover model IDs in your app, and the order to fix them in depending on where they live.
◉ AI Models2026-10-14
Take the Prompt Out of the App: An Edge Function Gateway With the Guard on the Output Side
A system prompt shipped inside your app is readable from the day it ships. This walkthrough moves the prompt into a Supabase Edge Function, lets the client name only a task, and puts the guard on an output allowlist, with tested code.