supabase-android

Configure Supabase Kotlin SDK for Android auth, data, and storage.

14|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/piyushverma0/android-agent-skills --skill supabase-android
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-android
Source: https://github.com/piyushverma0/android-agent-skills/tree/main/skills/supabase-android
Command: npx skills add https://github.com/piyushverma0/android-agent-skills --skill supabase-android

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase Android integration with the Kotlin SDK (supabase-kt) guides you through reliable setup, correct auth handling, and secure data access for Android apps. It addresses common pitfalls like UnauthorizedRestException, proper JWT usage for edge functions, and applying Row Level Security to protect user data.

Core Features & Use Cases

  • Comprehensive setup and dependency configuration (BOM, Kotlin serialization, and DI via Hilt).
  • Auth patterns including email/password, Google OAuth, phone OTP, and session management via sessionStatus Flow.
  • Postgrest-based database queries with @Serializable DTOs and proper decodeList/decodeSingle patterns.
  • Edge Functions invocation with proper JWT passthrough and verify_jwt considerations.
  • Realtime subscriptions and channel lifecycle management to reflect live data.
  • Storage file upload, private/public URL handling, and scoped paths with user IDs.
  • Security best practices: enable RLS, avoid service role keys on Android, and safe logging.

Quick Start

Install the Supabase Kotlin DSL into your Android project and begin wiring authentication, data access, edge functions, realtime, and storage using the patterns described.

Frequently Asked Questions about supabase-android

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix UnauthorizedRestException when querying Supabase from an Android app?

To fix UnauthorizedRestException in your Android app, enable Row Level Security on your Supabase tables and ensure you pass a valid user JWT with your Postgrest queries. Avoid using the service role key on the client side.

What is the best way to manage Supabase authentication sessions in Kotlin?

The best way to manage Supabase authentication sessions in Kotlin is by observing the sessionStatus Flow. This allows your Android app to reactively track user login states across email/password, Google OAuth, and phone OTP logins.

How do I set up Supabase Kotlin SDK dependencies using Hilt and BOM?

To set up Supabase Kotlin SDK dependencies, configure the Bill of Materials (BOM) for version alignment, apply the Kotlin serialization plugin, and use Hilt for dependency injection. This creates a structured, maintainable Android environment.

Can I invoke Supabase Edge Functions with JWT passthrough from Android?

Yes, you can invoke Supabase Edge Functions from Android with proper JWT passthrough. You must manage the verify_jwt considerations on your backend and ensure the Kotlin client securely forwards the authenticated user token.

How do I map Supabase Postgrest database queries to Kotlin DTOs?

You map Supabase Postgrest database queries to Kotlin by using @Serializable Data Transfer Objects. Apply the decodeList or decodeSingle patterns to accurately deserialize the JSON responses into typed Kotlin objects.

How to handle Supabase storage file uploads and scoped user paths in Android?

To handle Supabase storage file uploads in Android, implement private and public URL handling while scoping file paths with unique user IDs. This ensures secure data isolation and prevents unauthorized access to user files.