{"id":37652149,"url":"https://github.com/cap-go/capacitor-supabase","last_synced_at":"2026-06-16T01:00:16.259Z","repository":{"id":327287371,"uuid":"1106318654","full_name":"Cap-go/capacitor-supabase","owner":"Cap-go","description":"Native Supabase authentication, JWT access, and basic database helpers for Capacitor.","archived":false,"fork":false,"pushed_at":"2026-06-15T23:03:49.000Z","size":832,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T00:11:09.508Z","etag":null,"topics":["capacitor","capacitor-plugin"],"latest_commit_sha":null,"homepage":"https://github.com/Cap-go/capacitor-supabase","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2025-11-29T02:36:13.000Z","updated_at":"2026-06-15T23:03:53.000Z","dependencies_parsed_at":"2026-02-20T05:01:07.570Z","dependency_job_id":null,"html_url":"https://github.com/Cap-go/capacitor-supabase","commit_stats":null,"previous_names":["cap-go/capacitor-supabase"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capacitor-supabase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-supabase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-supabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34386320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitor","capacitor-plugin"],"created_at":"2026-01-16T11:35:03.969Z","updated_at":"2026-06-16T01:00:16.245Z","avatar_url":"https://github.com/Cap-go.png","language":"Swift","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":[],"sub_categories":[],"readme":"# @capgo/capacitor-supabase\n\u003ca href=\"https://capgo.app/\"\u003e\u003cimg src=\"https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-supabase\" alt=\"Capgo - Instant updates for Capacitor\" /\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin_supabase\"\u003e ➡️ Get Instant updates for your App with Capgo\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin_supabase\"\u003e Missing a feature? We'll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\nNative Supabase SDK integration for Capacitor - Auth, Database, and JWT access.\n\n## Why Capacitor Supabase?\n\nA native Supabase SDK integration that provides **real native authentication** with JWT token access for your Capacitor apps:\n\n- **Native SDK integration** - Full access to Supabase's native iOS and Android SDKs\n- **JWT token access** - Get JWT tokens from native auth for use in JavaScript/web layers\n- **Complete auth methods** - Email/password, OAuth, OTP, magic links, and more\n- **Session management** - Native session handling with automatic token refresh\n- **Database operations** - Native CRUD operations for Supabase tables\n- **Auth state listeners** - Real-time auth state change events\n- **Hybrid approach** - Use native auth with supabase-js for database queries\n- **Free and open source** - No paid services required\n\nPerfect for apps that need secure native authentication while leveraging Supabase's powerful backend services.\n\n**Why only Auth and basic DB operations?** The Supabase JS SDK already works great in Capacitor for most features (Realtime, Storage, Edge Functions, etc.). Building native bridges for every feature would add complexity without real benefits. This plugin focuses on **authentication** where native SDKs provide actual value (secure token storage, OAuth flows, biometrics). For everything else, just use `@supabase/supabase-js` with the JWT from native auth.\n\n**Why not bridge everything natively?**\n- **No performance gain** - The bridge overhead (JSON serialization/deserialization between JS and native) negates any benefit from skipping HTTP preflight requests. You're just moving the transformation cost from network to CPU.\n- **Type safety issue** - Native SDKs require typed models for every table/query. You'd need to define Swift/Kotlin types for your entire database schema and keep them in sync. With JS, you get dynamic typing that just works.\n- **Maintenance burden** - Every Supabase SDK update would require updating 3 codebases (JS, iOS, Android) instead of just one. The JS SDK is already well-maintained by Supabase.\n\n## Documentation\n\nThe most complete doc is available here: https://capgo.app/docs/plugins/supabase/\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained |\n| -------------- | ----------------------- | ---------- |\n| v8.\\*.\\*       | v8.\\*.\\*                | ✅          |\n| v7.\\*.\\*       | v7.\\*.\\*                | On demand   |\n| v6.\\*.\\*       | v6.\\*.\\*                | ❌          |\n| v5.\\*.\\*       | v5.\\*.\\*                | ❌          |\n\n\u003e **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-supabase\nnpx cap sync\n```\n\n## iOS Setup\n\nNo additional setup required. The plugin uses Swift Package Manager to include the Supabase Swift SDK.\n\n## Android Setup\n\nThe plugin requires a minimum SDK of 26 (Android 8.0). Make sure your `android/variables.gradle` has:\n\n```gradle\nminSdkVersion = 26\n```\n\n## Usage\n\n### Initialize the Client\n\n```typescript\nimport { CapacitorSupabase } from '@capgo/capacitor-supabase';\n\nawait CapacitorSupabase.initialize({\n  supabaseUrl: 'https://your-project.supabase.co',\n  supabaseKey: 'your-anon-key'\n});\n```\n\n### Authentication\n\n#### Sign In with Email/Password\n\n```typescript\nconst { session, user } = await CapacitorSupabase.signInWithPassword({\n  email: 'user@example.com',\n  password: 'password123'\n});\n\n// Access the JWT token\nconsole.log('JWT:', session?.accessToken);\n```\n\n#### Sign Up\n\n```typescript\nconst { session, user } = await CapacitorSupabase.signUp({\n  email: 'newuser@example.com',\n  password: 'password123',\n  data: { name: 'John Doe' }\n});\n```\n\n#### OAuth Sign In\n\n```typescript\nawait CapacitorSupabase.signInWithOAuth({\n  provider: 'google',\n  redirectTo: 'myapp://callback'\n});\n```\n\n#### OTP Sign In\n\n```typescript\n// Send OTP\nawait CapacitorSupabase.signInWithOtp({\n  email: 'user@example.com'\n});\n\n// Verify OTP\nconst { session, user } = await CapacitorSupabase.verifyOtp({\n  email: 'user@example.com',\n  token: '123456',\n  type: 'email'\n});\n```\n\n#### Sign Out\n\n```typescript\nawait CapacitorSupabase.signOut();\n```\n\n### Session Management\n\n#### Get Current Session\n\n```typescript\nconst { session } = await CapacitorSupabase.getSession();\nif (session) {\n  console.log('JWT:', session.accessToken);\n  console.log('Refresh Token:', session.refreshToken);\n  console.log('Expires At:', session.expiresAt);\n}\n```\n\n#### Refresh Session\n\n```typescript\nconst { session } = await CapacitorSupabase.refreshSession();\n```\n\n#### Get Current User\n\n```typescript\nconst { user } = await CapacitorSupabase.getUser();\nif (user) {\n  console.log('User ID:', user.id);\n  console.log('Email:', user.email);\n}\n```\n\n#### Set Session Manually\n\n```typescript\nconst { session } = await CapacitorSupabase.setSession({\n  accessToken: 'eyJ...',\n  refreshToken: 'abc123'\n});\n```\n\n### Listen to Auth State Changes\n\n```typescript\nconst listener = await CapacitorSupabase.addListener(\n  'authStateChange',\n  ({ event, session }) =\u003e {\n    console.log('Auth event:', event);\n    // Events: INITIAL_SESSION, SIGNED_IN, SIGNED_OUT, TOKEN_REFRESHED, USER_UPDATED\n    if (session) {\n      console.log('JWT:', session.accessToken);\n    }\n  }\n);\n\n// Later, remove the listener\nlistener.remove();\n```\n\n### Using JWT with @supabase/supabase-js\n\nThe main use case is to get the JWT from native auth and use it with the JavaScript Supabase client:\n\n```typescript\nimport { createClient } from '@supabase/supabase-js';\nimport { CapacitorSupabase } from '@capgo/capacitor-supabase';\n\n// Initialize native client\nawait CapacitorSupabase.initialize({\n  supabaseUrl: 'https://your-project.supabase.co',\n  supabaseKey: 'your-anon-key'\n});\n\n// Sign in natively\nawait CapacitorSupabase.signInWithPassword({\n  email: 'user@example.com',\n  password: 'password'\n});\n\n// Get session with JWT\nconst { session } = await CapacitorSupabase.getSession();\n\n// Create JS client with the native session\nconst supabase = createClient(\n  'https://your-project.supabase.co',\n  'your-anon-key',\n  {\n    global: {\n      headers: {\n        Authorization: `Bearer ${session?.accessToken}`\n      }\n    }\n  }\n);\n\n// Now use supabase-js as normal\nconst { data } = await supabase.from('table').select('*');\n```\n\n### Database Operations (Native)\n\nThe plugin also supports native database operations:\n\n#### Select\n\n```typescript\nconst { data, error } = await CapacitorSupabase.select({\n  table: 'users',\n  columns: 'id, name, email',\n  filter: { active: true },\n  limit: 10,\n  orderBy: 'created_at',\n  ascending: false\n});\n```\n\n#### Insert\n\n```typescript\nconst { data, error } = await CapacitorSupabase.insert({\n  table: 'posts',\n  values: { title: 'Hello', content: 'World' }\n});\n```\n\n#### Update\n\n```typescript\nconst { data, error } = await CapacitorSupabase.update({\n  table: 'posts',\n  values: { title: 'Updated Title' },\n  filter: { id: 1 }\n});\n```\n\n#### Delete\n\n```typescript\nconst { data, error } = await CapacitorSupabase.delete({\n  table: 'posts',\n  filter: { id: 1 }\n});\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`initialize(...)`](#initialize)\n* [`signInWithPassword(...)`](#signinwithpassword)\n* [`signUp(...)`](#signup)\n* [`signInWithOAuth(...)`](#signinwithoauth)\n* [`signInWithOtp(...)`](#signinwithotp)\n* [`verifyOtp(...)`](#verifyotp)\n* [`signOut()`](#signout)\n* [`getSession()`](#getsession)\n* [`refreshSession()`](#refreshsession)\n* [`getUser()`](#getuser)\n* [`setSession(...)`](#setsession)\n* [`addListener('authStateChange', ...)`](#addlistenerauthstatechange-)\n* [`removeAllListeners()`](#removealllisteners)\n* [`select(...)`](#select)\n* [`insert(...)`](#insert)\n* [`update(...)`](#update)\n* [`delete(...)`](#delete)\n* [`getPluginVersion()`](#getpluginversion)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\nCapacitor Supabase Plugin for native Supabase SDK integration.\n\nThis plugin provides native iOS and Android Supabase SDK functionality\nwith the ability to retrieve JWT tokens for use in JavaScript/web layers.\n\n### initialize(...)\n\n```typescript\ninitialize(options: SupabaseConfig) =\u003e Promise\u003cvoid\u003e\n```\n\nInitialize the Supabase client with your project credentials.\nMust be called before any other methods.\n\n| Param         | Type                                                      | Description                                       |\n| ------------- | --------------------------------------------------------- | ------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#supabaseconfig\"\u003eSupabaseConfig\u003c/a\u003e\u003c/code\u003e | - Configuration options including URL and API key |\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### signInWithPassword(...)\n\n```typescript\nsignInWithPassword(options: SignInWithPasswordOptions) =\u003e Promise\u003cAuthResult\u003e\n```\n\nSign in with email and password.\n\n| Param         | Type                                                                            | Description                      |\n| ------------- | ------------------------------------------------------------------------------- | -------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#signinwithpasswordoptions\"\u003eSignInWithPasswordOptions\u003c/a\u003e\u003c/code\u003e | - Email and password credentials |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#authresult\"\u003eAuthResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### signUp(...)\n\n```typescript\nsignUp(options: SignUpOptions) =\u003e Promise\u003cAuthResult\u003e\n```\n\nSign up a new user with email and password.\n\n| Param         | Type                                                    | Description                                   |\n| ------------- | ------------------------------------------------------- | --------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#signupoptions\"\u003eSignUpOptions\u003c/a\u003e\u003c/code\u003e | - Email, password, and optional user metadata |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#authresult\"\u003eAuthResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### signInWithOAuth(...)\n\n```typescript\nsignInWithOAuth(options: SignInWithOAuthOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSign in with an OAuth provider.\nOpens the provider's authentication page.\n\n| Param         | Type                                                                      | Description                                |\n| ------------- | ------------------------------------------------------------------------- | ------------------------------------------ |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#signinwithoauthoptions\"\u003eSignInWithOAuthOptions\u003c/a\u003e\u003c/code\u003e | - OAuth provider and optional redirect URL |\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### signInWithOtp(...)\n\n```typescript\nsignInWithOtp(options: SignInWithOtpOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSign in with OTP (One-Time Password) sent via email or SMS.\n\n| Param         | Type                                                                  | Description                            |\n| ------------- | --------------------------------------------------------------------- | -------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#signinwithotpoptions\"\u003eSignInWithOtpOptions\u003c/a\u003e\u003c/code\u003e | - Email or phone number to send OTP to |\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### verifyOtp(...)\n\n```typescript\nverifyOtp(options: VerifyOtpOptions) =\u003e Promise\u003cAuthResult\u003e\n```\n\nVerify an OTP token.\n\n| Param         | Type                                                          | Description                                 |\n| ------------- | ------------------------------------------------------------- | ------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#verifyotpoptions\"\u003eVerifyOtpOptions\u003c/a\u003e\u003c/code\u003e | - Email/phone, token, and verification type |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#authresult\"\u003eAuthResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### signOut()\n\n```typescript\nsignOut() =\u003e Promise\u003cvoid\u003e\n```\n\nSign out the current user.\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### getSession()\n\n```typescript\ngetSession() =\u003e Promise\u003c{ session: Session | null; }\u003e\n```\n\nGet the current session if one exists.\nReturns the session with JWT access token.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ session: \u003ca href=\"#session\"\u003eSession\u003c/a\u003e | null; }\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### refreshSession()\n\n```typescript\nrefreshSession() =\u003e Promise\u003c{ session: Session | null; }\u003e\n```\n\nRefresh the current session and get new tokens.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ session: \u003ca href=\"#session\"\u003eSession\u003c/a\u003e | null; }\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### getUser()\n\n```typescript\ngetUser() =\u003e Promise\u003c{ user: User | null; }\u003e\n```\n\nGet the currently authenticated user.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ user: \u003ca href=\"#user\"\u003eUser\u003c/a\u003e | null; }\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### setSession(...)\n\n```typescript\nsetSession(options: SetSessionOptions) =\u003e Promise\u003c{ session: Session | null; }\u003e\n```\n\nSet the session manually with access and refresh tokens.\nUseful for restoring a session or integrating with external auth.\n\n| Param         | Type                                                            | Description                 |\n| ------------- | --------------------------------------------------------------- | --------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setsessionoptions\"\u003eSetSessionOptions\u003c/a\u003e\u003c/code\u003e | - Access and refresh tokens |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ session: \u003ca href=\"#session\"\u003eSession\u003c/a\u003e | null; }\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### addListener('authStateChange', ...)\n\n```typescript\naddListener(eventName: 'authStateChange', listenerFunc: (data: AuthStateChange) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen to authentication state changes.\n\n| Param              | Type                                                                           | Description                                |\n| ------------------ | ------------------------------------------------------------------------------ | ------------------------------------------ |\n| **`eventName`**    | \u003ccode\u003e'authStateChange'\u003c/code\u003e                                                 | - Must be 'authStateChange'                |\n| **`listenerFunc`** | \u003ccode\u003e(data: \u003ca href=\"#authstatechange\"\u003eAuthStateChange\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e | - Callback function for auth state changes |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() =\u003e Promise\u003cvoid\u003e\n```\n\nRemove all listeners for auth state changes.\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### select(...)\n\n```typescript\nselect\u003cT = unknown\u003e(options: SelectOptions) =\u003e Promise\u003cQueryResult\u003cT[]\u003e\u003e\n```\n\nExecute a SELECT query on a table.\n\n| Param         | Type                                                    | Description                                       |\n| ------------- | ------------------------------------------------------- | ------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#selectoptions\"\u003eSelectOptions\u003c/a\u003e\u003c/code\u003e | - Query options including table, columns, filters |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#queryresult\"\u003eQueryResult\u003c/a\u003e\u0026lt;T[]\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### insert(...)\n\n```typescript\ninsert\u003cT = unknown\u003e(options: InsertOptions) =\u003e Promise\u003cQueryResult\u003cT\u003e\u003e\n```\n\nInsert data into a table.\n\n| Param         | Type                                                    | Description                       |\n| ------------- | ------------------------------------------------------- | --------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#insertoptions\"\u003eInsertOptions\u003c/a\u003e\u003c/code\u003e | - Table name and values to insert |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#queryresult\"\u003eQueryResult\u003c/a\u003e\u0026lt;T\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### update(...)\n\n```typescript\nupdate\u003cT = unknown\u003e(options: UpdateOptions) =\u003e Promise\u003cQueryResult\u003cT\u003e\u003e\n```\n\nUpdate data in a table.\n\n| Param         | Type                                                    | Description                                           |\n| ------------- | ------------------------------------------------------- | ----------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#updateoptions\"\u003eUpdateOptions\u003c/a\u003e\u003c/code\u003e | - Table name, values to update, and filter conditions |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#queryresult\"\u003eQueryResult\u003c/a\u003e\u0026lt;T\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### delete(...)\n\n```typescript\ndelete\u003cT = unknown\u003e(options: DeleteOptions) =\u003e Promise\u003cQueryResult\u003cT\u003e\u003e\n```\n\nDelete data from a table.\n\n| Param         | Type                                                    | Description                        |\n| ------------- | ------------------------------------------------------- | ---------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#deleteoptions\"\u003eDeleteOptions\u003c/a\u003e\u003c/code\u003e | - Table name and filter conditions |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#queryresult\"\u003eQueryResult\u003c/a\u003e\u0026lt;T\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003c{ version: string; }\u003e\n```\n\nGet the native Capacitor plugin version.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ version: string; }\u0026gt;\u003c/code\u003e\n\n**Since:** 0.0.1\n\n--------------------\n\n\n### Interfaces\n\n\n#### SupabaseConfig\n\nConfiguration options for initializing the Supabase client.\n\n| Prop              | Type                | Description                        | Since |\n| ----------------- | ------------------- | ---------------------------------- | ----- |\n| **`supabaseUrl`** | \u003ccode\u003estring\u003c/code\u003e | The Supabase project URL.          | 0.0.1 |\n| **`supabaseKey`** | \u003ccode\u003estring\u003c/code\u003e | The Supabase anonymous/public key. | 0.0.1 |\n\n\n#### AuthResult\n\nResult of authentication operations that return a session.\n\n| Prop          | Type                                                | Description                                   | Since |\n| ------------- | --------------------------------------------------- | --------------------------------------------- | ----- |\n| **`session`** | \u003ccode\u003e\u003ca href=\"#session\"\u003eSession\u003c/a\u003e \\| null\u003c/code\u003e | The session if authentication was successful. | 0.0.1 |\n| **`user`**    | \u003ccode\u003e\u003ca href=\"#user\"\u003eUser\u003c/a\u003e \\| null\u003c/code\u003e       | The authenticated user if successful.         | 0.0.1 |\n\n\n#### Session\n\n\u003ca href=\"#session\"\u003eSession\u003c/a\u003e object containing authentication tokens.\n\n| Prop               | Type                                  | Description                                                    | Since |\n| ------------------ | ------------------------------------- | -------------------------------------------------------------- | ----- |\n| **`accessToken`**  | \u003ccode\u003estring\u003c/code\u003e                   | The JWT access token. Use this for authenticated API requests. | 0.0.1 |\n| **`refreshToken`** | \u003ccode\u003estring\u003c/code\u003e                   | The refresh token for obtaining new access tokens.             | 0.0.1 |\n| **`tokenType`**    | \u003ccode\u003estring\u003c/code\u003e                   | Token type (usually \"bearer\").                                 | 0.0.1 |\n| **`expiresIn`**    | \u003ccode\u003enumber\u003c/code\u003e                   | Number of seconds until the access token expires.              | 0.0.1 |\n| **`expiresAt`**    | \u003ccode\u003enumber\u003c/code\u003e                   | Unix timestamp when the token expires.                         | 0.0.1 |\n| **`user`**         | \u003ccode\u003e\u003ca href=\"#user\"\u003eUser\u003c/a\u003e\u003c/code\u003e | The authenticated user.                                        | 0.0.1 |\n\n\n#### User\n\n\u003ca href=\"#user\"\u003eUser\u003c/a\u003e object returned from authentication operations.\n\n| Prop               | Type                                                             | Description                                        | Since |\n| ------------------ | ---------------------------------------------------------------- | -------------------------------------------------- | ----- |\n| **`id`**           | \u003ccode\u003estring\u003c/code\u003e                                              | Unique identifier for the user.                    | 0.0.1 |\n| **`email`**        | \u003ccode\u003estring\u003c/code\u003e                                              | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's email address.          | 0.0.1 |\n| **`phone`**        | \u003ccode\u003estring\u003c/code\u003e                                              | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's phone number.           | 0.0.1 |\n| **`createdAt`**    | \u003ccode\u003estring\u003c/code\u003e                                              | Timestamp when the user was created.               | 0.0.1 |\n| **`lastSignInAt`** | \u003ccode\u003estring\u003c/code\u003e                                              | Timestamp when the user last signed in.            | 0.0.1 |\n| **`userMetadata`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e metadata (custom fields). | 0.0.1 |\n| **`appMetadata`**  | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | App metadata.                                      | 0.0.1 |\n\n\n#### SignInWithPasswordOptions\n\nOptions for email/password sign-in.\n\n| Prop           | Type                | Description                               | Since |\n| -------------- | ------------------- | ----------------------------------------- | ----- |\n| **`email`**    | \u003ccode\u003estring\u003c/code\u003e | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's email address. | 0.0.1 |\n| **`password`** | \u003ccode\u003estring\u003c/code\u003e | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's password.      | 0.0.1 |\n\n\n#### SignUpOptions\n\nOptions for email/password sign-up.\n\n| Prop           | Type                                                             | Description                                    | Since |\n| -------------- | ---------------------------------------------------------------- | ---------------------------------------------- | ----- |\n| **`email`**    | \u003ccode\u003estring\u003c/code\u003e                                              | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's email address.      | 0.0.1 |\n| **`password`** | \u003ccode\u003estring\u003c/code\u003e                                              | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's password.           | 0.0.1 |\n| **`data`**     | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | Optional user metadata to store with the user. | 0.0.1 |\n\n\n#### SignInWithOAuthOptions\n\nOptions for OAuth sign-in.\n\n| Prop             | Type                                                    | Description                              | Since |\n| ---------------- | ------------------------------------------------------- | ---------------------------------------- | ----- |\n| **`provider`**   | \u003ccode\u003e\u003ca href=\"#oauthprovider\"\u003eOAuthProvider\u003c/a\u003e\u003c/code\u003e | The OAuth provider to use.               | 0.0.1 |\n| **`redirectTo`** | \u003ccode\u003estring\u003c/code\u003e                                     | URL to redirect to after authentication. | 0.0.1 |\n| **`scopes`**     | \u003ccode\u003estring\u003c/code\u003e                                     | OAuth scopes to request.                 | 0.0.1 |\n\n\n#### SignInWithOtpOptions\n\nOptions for OTP sign-in.\n\n| Prop        | Type                | Description                                                                   | Since |\n| ----------- | ------------------- | ----------------------------------------------------------------------------- | ----- |\n| **`email`** | \u003ccode\u003estring\u003c/code\u003e | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's email address (required if phone is not provided). | 0.0.1 |\n| **`phone`** | \u003ccode\u003estring\u003c/code\u003e | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's phone number (required if email is not provided).  | 0.0.1 |\n\n\n#### VerifyOtpOptions\n\nOptions for verifying OTP.\n\n| Prop        | Type                                                                   | Description                                                                   | Since |\n| ----------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----- |\n| **`email`** | \u003ccode\u003estring\u003c/code\u003e                                                    | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's email address (required if phone is not provided). | 0.0.1 |\n| **`phone`** | \u003ccode\u003estring\u003c/code\u003e                                                    | \u003ca href=\"#user\"\u003eUser\u003c/a\u003e's phone number (required if email is not provided).  | 0.0.1 |\n| **`token`** | \u003ccode\u003estring\u003c/code\u003e                                                    | The OTP token received via email/SMS.                                         | 0.0.1 |\n| **`type`**  | \u003ccode\u003e'sms' \\| 'email' \\| 'magiclink' \\| 'signup' \\| 'recovery'\u003c/code\u003e | The type of OTP verification.                                                 | 0.0.1 |\n\n\n#### SetSessionOptions\n\nOptions for setting a session manually.\n\n| Prop               | Type                | Description        | Since |\n| ------------------ | ------------------- | ------------------ | ----- |\n| **`accessToken`**  | \u003ccode\u003estring\u003c/code\u003e | The access token.  | 0.0.1 |\n| **`refreshToken`** | \u003ccode\u003estring\u003c/code\u003e | The refresh token. | 0.0.1 |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | \u003ccode\u003e() =\u0026gt; Promise\u0026lt;void\u0026gt;\u003c/code\u003e |\n\n\n#### AuthStateChange\n\nAuth state change callback data.\n\n| Prop          | Type                                                        | Description                               | Since |\n| ------------- | ----------------------------------------------------------- | ----------------------------------------- | ----- |\n| **`event`**   | \u003ccode\u003e\u003ca href=\"#authchangeevent\"\u003eAuthChangeEvent\u003c/a\u003e\u003c/code\u003e | The type of auth event.                   | 0.0.1 |\n| **`session`** | \u003ccode\u003e\u003ca href=\"#session\"\u003eSession\u003c/a\u003e \\| null\u003c/code\u003e         | The current session (null if signed out). | 0.0.1 |\n\n\n#### QueryResult\n\nResult of database queries.\n\n| Prop        | Type                        | Description                                         | Since |\n| ----------- | --------------------------- | --------------------------------------------------- | ----- |\n| **`data`**  | \u003ccode\u003eT \\| null\u003c/code\u003e      | The query result data.                              | 0.0.1 |\n| **`error`** | \u003ccode\u003estring \\| null\u003c/code\u003e | Error message if the query failed.                  | 0.0.1 |\n| **`count`** | \u003ccode\u003enumber\u003c/code\u003e         | Number of affected rows (for insert/update/delete). | 0.0.1 |\n\n\n#### SelectOptions\n\nOptions for database select queries.\n\n| Prop            | Type                                                             | Description                              | Since |\n| --------------- | ---------------------------------------------------------------- | ---------------------------------------- | ----- |\n| **`table`**     | \u003ccode\u003estring\u003c/code\u003e                                              | The table name to query.                 | 0.0.1 |\n| **`columns`**   | \u003ccode\u003estring\u003c/code\u003e                                              | Columns to select (default: \"*\").        | 0.0.1 |\n| **`filter`**    | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | Filter conditions as key-value pairs.    | 0.0.1 |\n| **`limit`**     | \u003ccode\u003enumber\u003c/code\u003e                                              | Maximum number of rows to return.        | 0.0.1 |\n| **`offset`**    | \u003ccode\u003enumber\u003c/code\u003e                                              | Number of rows to skip.                  | 0.0.1 |\n| **`orderBy`**   | \u003ccode\u003estring\u003c/code\u003e                                              | Column to order by.                      | 0.0.1 |\n| **`ascending`** | \u003ccode\u003eboolean\u003c/code\u003e                                             | Order direction.                         | 0.0.1 |\n| **`single`**    | \u003ccode\u003eboolean\u003c/code\u003e                                             | Return a single row instead of an array. | 0.0.1 |\n\n\n#### InsertOptions\n\nOptions for database insert queries.\n\n| Prop         | Type                                                                                                                      | Description                                             | Since |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----- |\n| **`table`**  | \u003ccode\u003estring\u003c/code\u003e                                                                                                       | The table name to insert into.                          | 0.0.1 |\n| **`values`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt; \\| \u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;[]\u003c/code\u003e | The data to insert (single object or array of objects). | 0.0.1 |\n\n\n#### UpdateOptions\n\nOptions for database update queries.\n\n| Prop         | Type                                                             | Description                                | Since |\n| ------------ | ---------------------------------------------------------------- | ------------------------------------------ | ----- |\n| **`table`**  | \u003ccode\u003estring\u003c/code\u003e                                              | The table name to update.                  | 0.0.1 |\n| **`values`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | The data to update.                        | 0.0.1 |\n| **`filter`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | Filter conditions to match rows to update. | 0.0.1 |\n\n\n#### DeleteOptions\n\nOptions for database delete queries.\n\n| Prop         | Type                                                             | Description                                | Since |\n| ------------ | ---------------------------------------------------------------- | ------------------------------------------ | ----- |\n| **`table`**  | \u003ccode\u003estring\u003c/code\u003e                                              | The table name to delete from.             | 0.0.1 |\n| **`filter`** | \u003ccode\u003e\u003ca href=\"#record\"\u003eRecord\u003c/a\u003e\u0026lt;string, unknown\u0026gt;\u003c/code\u003e | Filter conditions to match rows to delete. | 0.0.1 |\n\n\n### Type Aliases\n\n\n#### Record\n\nConstruct a type with a set of properties K of type T\n\n\u003ccode\u003e{\r [P in K]: T;\r }\u003c/code\u003e\n\n\n#### OAuthProvider\n\nSupported OAuth providers.\n\n\u003ccode\u003e'apple' | 'azure' | 'bitbucket' | 'discord' | 'facebook' | 'figma' | 'github' | 'gitlab' | 'google' | 'kakao' | 'keycloak' | 'linkedin' | 'linkedin_oidc' | 'notion' | 'slack' | 'slack_oidc' | 'spotify' | 'twitch' | 'twitter' | 'workos' | 'zoom'\u003c/code\u003e\n\n\n#### AuthChangeEvent\n\nAuth state change event types.\n\n\u003ccode\u003e'INITIAL_SESSION' | 'SIGNED_IN' | 'SIGNED_OUT' | 'TOKEN_REFRESHED' | 'USER_UPDATED' | 'PASSWORD_RECOVERY'\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n\n## License\n\nMPL-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-go%2Fcapacitor-supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-supabase/lists"}