SuperAPI AI Directory

ionic-supabase

Data & analytics

View repository

Updated 10-15 21:39

About this skill

Supabase

Open-source Firebase alternative: Postgres + GoTrue auth + Realtime + Storage. Same shape as ionic-firebase but Postgres-flavored — pick this when your team prefers SQL, RLS, or self-hosting.

When to consult

Hard rules

  • ✅ The anon key is publishable — safe to ship in the bundle. Row Level Security (RLS) does the gating.
  • ✅ The service role key is a secret — NEVER ship it; server-side only.
  • ✅ Enable RLS on every table that holds user data. Without RLS, anon-key clients can read/write everything.
  • ✅ Native OAuth (Google / Apple) on mobile uses signInWithOAuth({ skipBrowserRedirect: true }) + your app's deep-link scheme. The default web flow doesn't return cleanly to a native app.
  • ❌ Don't store JWTs in localStorage if you can avoid it — use @capacitor/preferences via the Supabase storage adapter (see setup.md).

Library

npm install @supabase/supabase-js

No native plugin required — the JS client works in WKWebView / Android WebView and uses HTTPS only.