Supabase Auth logo

REST API integration

Supabase Auth REST API integration for Draftbit

Use Supabase Auth REST endpoints

Build a working app with Supabase Auth

What is Supabase Auth?

Build a task app with Supabase Auth, Postgres, Storage, and Realtime. Use the project's publishable key and the signed-in user's session in the app, then enforce ownership with Row Level Security. MCP tools help the agent inspect a project while it builds; they don't establish the mobile user's identity or replace database policies.

Use Supabase Auth with Draftbit

  • Create and read tasks owned by the signed-in user.
  • Protect database rows and stored files with ownership policies.
  • Refresh a task list when authorized data changes.

Example

supabase-auth-example.ts
// Example: fetch from Supabase Auth
const response = await fetch("https://{project_ref}.supabase.co/auth/v1/signup", {
  headers: {
    "apikey": "YOUR_SUPABASE_AUTH_TOKEN",
    "Authorization": "Bearer YOUR_SUPABASE_AUTH_VALUE_2",
  },
});
const data = await response.json();

Use cases

  • Add sign-up, sign-in, and password reset flows to a mobile app
  • Gate premium features behind authenticated user sessions
  • Sync user profiles across web and native clients

Authentication

Authentication uses 2 headers (`apikey`, `Authorization`). Paste each value once in Draftbit and every request to Supabase Auth carries them automatically for agent tools. Configure runtime authorization separately in the generated app.

Use Supabase Auth in a Draftbit app today

Use Draftbit to build your app, configure Supabase Auth, and test the feature before publishing.

Start building free

Frequently asked questions

How does this service fit into the app?

Build a task app with Supabase Auth, Postgres, Storage, and Realtime. Use the project's publishable key and the signed-in user's session in the app, then enforce ownership with Row Level Security. MCP tools help the agent inspect a project while it builds; they don't establish the mobile user's identity or replace database policies.

Does adding an integration finish the runtime setup?

No. Follow the linked walkthrough to install the SDK or build the backend and the app requests. The tools the agent uses while building don't replace sign-in and authorization in the app itself.

Where should I start?

Open the guide above, create a separate test project, and use its prompts and code to build one working feature. A template gives you a starting interface; you'll still connect the service yourself.

What should I verify before publishing?

The successful flow, a failed request, sign-out, and what a second user can see. Check that secret keys stay on the backend. For payments, run the provider's real sandbox flow in a native build too.

Related Integrations

Get started free Browse all Integrations