scribase
Scribase for expo and react native teams

A backend for your Expo app with sign-in, storage, and a flat bill

Your client SDK in React Native, Apple and Google sign-in, Postgres underneath.

Mobile apps need auth that survives app restarts, uploads from the camera roll, and a backend that does not charge per read. Expo apps already use a standard JavaScript client; point it at Scribase and you get the same session handling, Apple and Google sign-in over PKCE, and storage uploads, backed by Postgres with row-level security.

What you need

  • Persistent sessions on device and Apple/Google sign-in
  • Uploads from the device with per-user access rules
  • A backend bill that does not grow with every screen view
# lib/scribase.ts in an Expo app
import AsyncStorage from '@react-native-async-storage/async-storage';
import { createClient } from '@supabase/supabase-js';

export const scribase = createClient(process.env.EXPO_PUBLIC_SCRIBASE_URL!, process.env.EXPO_PUBLIC_SCRIBASE_ANON_KEY!, {
  auth: { storage: AsyncStorage, autoRefreshToken: true, persistSession: true, detectSessionInUrl: false },
});

How Scribase fits

The JavaScript client on React Native

Create the client with an AsyncStorage (or SecureStore) adapter and autoRefreshToken on. Sessions persist across restarts and refresh in the background.

Apple and Google sign-in

signInWithOAuth with flowType pkce and skipBrowserRedirect gives you the provider URL; open it with expo-web-browser, then exchangeCodeForSession with the code from your app scheme redirect. The auth server runs the PKCE exchange, so no client secret ships in the app.

Storage with RLS

Upload from the image picker to a private bucket and scope objects by user id with a storage policy, so users only read their own files.

FAQ

Common questions

Is there offline-first sync like Firestore?

No. Scribase provides realtime subscriptions and standard queries; offline-first sync is not built in yet.

Can I move an existing Firebase Auth user base?

Yes. The Firebase importer carries users, linked providers, and scrypt password hashes, and the auth server verifies them at sign-in and upgrades them to Argon2 on first login.