Complete Setup Guide
Step 1: Create Your Supabase Project1. Visit
https://app.supabase.com/ and create a free account
2. Click "New Project" and select your organization
3. Enter project name, database password, and select region closest to your users
4. Wait 1-2 minutes for project initialization
5. Your project dashboard will appear when ready
Step 2: Configure Database Access1. Go to "Settings" > "API" in your Supabase dashboard
2. Copy your "Project URL" (format:
https://yourproject.supabase.co)
3. Copy your "anon public" key (starts with "eyJ...")
4.
Important: Never use the "service_role" key in Bubble - it's for server-side only
5. Note your "JWT Secret" for advanced integrations
Step 3: Install Plugin in Bubble1. In Bubble editor, go to "Plugins" tab
2. Click "Add plugins" and search "Complete Supabase Integration Kit"
3. Install the plugin
4. Go to "Plugins" > "Complete Supabase Integration Kit"
5. In "Shared parameters", paste your Supabase URL and anon key
6. Save settings
Step 4: Verify Connection1. Add any Supabase element to a page
2. Check for errors in browser console
3. If successful, you'll see no connection errors
Supabase Auth Element - Complete GuidePurpose & Capabilities• Complete user lifecycle management without workload units
• OAuth integration with 19+ providers (Google, GitHub, Apple, Facebook, Twitter, LinkedIn, Discord, Slack, Spotify, etc.)
• Enterprise SSO with SAML 2.0 support
• Password reset workflows with custom redirect URLs
• User metadata for custom profiles, roles, and permissions
• Multi-factor authentication support
• Session management and token refresh
Element Setup1. Drag "Supabase Auth" element to any page (can be invisible)
2. Set "Current user's object" to "User (Supabase Plugin)"
3. Position: Make it 1x1 pixel if you want it invisible
4. The element manages global user state across your entire app
User Registration ExamplesBasic Sign Up:{
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"password": "SecurePassword123!"
}
Sign Up with User Metadata:{
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"password": "SecurePass123!",
"metadata": {
"full_name": "John Doe",
"company": "Acme Corp",
"role": "admin",
"department": "Engineering",
"phone": "+1234567890",
"preferences": {
"theme": "dark",
"notifications": true
}
}
}
Sign Up with Email Confirmation:{
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"password": "SecurePass123!",
"isRequirePasswordConfirmationEmail": true,
"redirect_url": "[color=#0205d3][url=https://yourapp.bubbleapps.io/welcome]https://yourapp.bubbleapps.io/welcome[/url][/color]"
}
OAuth Integration SetupConfigure OAuth Providers in Supabase:1. Go to "Authentication" > "Providers" in Supabase dashboard
2. Enable desired providers (Google, GitHub, etc.)
3. Add OAuth credentials from each provider
4. Set redirect URLs for each provider
OAuth Sign-In Examples:Google OAuth:• Provider: "google"
• Redirect URL: "
https://yourapp.bubbleapps.io/oauth-callback"
• Scopes: "profile,email"
GitHub OAuth:• Provider: "github"
• Redirect URL: "
https://yourapp.bubbleapps.io/oauth-callback"
• Scopes: "user:email"
Advanced OAuth with Custom Parameters:{
"provider": "google",
"redirect_url": "[color=#0205d3][url=https://yourapp.bubbleapps.io/dashboard]https://yourapp.bubbleapps.io/dashboard[/url][/color]",
"scopes": "profile,email,openid",
"additional_parameters": {
"prompt": "consent",
"access_type": "offline"
}
}
Password ManagementPassword Reset:{
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"redirect_url": "[color=#0205d3][url=https://yourapp.bubbleapps.io/reset-password]https://yourapp.bubbleapps.io/reset-password[/url][/color]"
}
Update Password:{
"new_password": "NewSecurePassword123!"
}
Available User DataOnce authenticated, access these from "Current User's Supabase":
• id: Unique user identifier
• email: User's email address
• user_metadata: Custom data you stored during signup
• app_metadata: System metadata (roles, permissions)
• created_at: Account creation timestamp
• last_sign_in_at: Last login timestamp
• access_token: For API calls requiring authentication
Workflow Triggers• "User is logged in": Redirect to dashboard, load user-specific data
• "User is logged out": Clear sensitive data, redirect to login
• "User signed up & not logged in": Show email confirmation message
• "Password reset email sent": Confirm email was sent
• "Error occurs": Display error message to user
Supabase Database Element - Complete GuidePurpose & Capabilities• Full PostgreSQL database with advanced querying
• Real-time subscriptions for live data updates
• Complex relationships with foreign keys and joins
• Bulk operations for data import/export
• Analytics queries with aggregations and grouping
• Row Level Security (RLS) for data access control
• ACID transactions and data consistency
Element Setup1. Add "Supabase Database" element to pages needing data
2. Set "Type of returned objects" to your custom Bubble data type
3. Enter "Table name" (exact name from Supabase)
4. Optionally enable "Enable Realtime?" for live updates
5. Set unique "Realtime Topic ID" if using realtime
Database Query ExamplesBasic Search (Get All Records):{
"select": "*"
}
Search with Specific Fields:{
"select": "id, name, email, created_at"
}
Search with Filters:Filters default to AND. Empty values are ignored.
{
"select": "*",
"filters": [
{"field": "status", "operator": "eq", "value": "active"},
{"field": "age", "operator": "gte", "value": 18}
]
}
OR Groups: Use {"or":[...]} for OR conditions:
{
"filters": [
{"field": "branch_id", "operator": "eq", "value": "123"},
{
"or": [
{"field": "address_line_1", "operator": "ilike", "value": "%search%"},
{"field": "address_line_2", "operator": "ilike", "value": "%search%"}
]
}
]
}
Result: branch_id='123' AND (address_line_1 OR address_line_2)
Pagination:{
"start": 0,
"stop": 9
}
Auto-includes total_count state.
Advanced Search with Multiple Conditions:{
"select": "id, name, email, profile(*), orders(count)",
"filters": [
{"field": "status", "operator": "eq", "value": "active"},
{"field": "created_at", "operator": "gte", "value": "2024-01-01"},
{"field": "subscription_type", "operator": "neq", "value": "free"}
],
"order": [
{"field": "created_at", "ascending": false},
{"field": "name", "ascending": true}
],
"limit": 50,
"offset": 0
}
Text Search:{
"select": "*",
"filters": [
{"field": "name", "operator": "ilike", "value": "%john%"},
{"field": "description", "operator": "fts", "value": "search terms"}
]
}
Date Range Queries:{
"select": "*",
"filters": [
{"field": "created_at", "operator": "gte", "value": "2024-01-01T00:00:00Z"},
{"field": "created_at", "operator": "lt", "value": "2024-12-31T23:59:59Z"}
]
}
Available Filter Operators:• eq: equals
• neq: not equals
• gt: greater than
• gte: greater than or equal
• lt: less than
• lte: less than or equal
• like: pattern matching (case sensitive)
• ilike: pattern matching (case insensitive)
• in: value in array
• is: for null/not null checks
• fts: full text search
Create OperationsCreate Single Record:{
"name": "John Doe",
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"age": 30,
"status": "active",
"metadata": {
"source": "web_signup",
"preferences": ["email_notifications"]
}
}
Create with Relationships:{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"product_name": "Premium Plan",
"price": 99.99,
"currency": "USD",
"order_items": [
{"item_id": 1, "quantity": 2},
{"item_id": 2, "quantity": 1}
]
}
Update OperationsUpdate Single Record:{
"fields": {
"status": "inactive",
"updated_at": "2024-06-11T10:00:00Z",
"notes": "Account deactivated by user request"
},
"filters": [
{"field": "id", "operator": "eq", "value": 123}
]
}
Bulk Update:{
"fields": {
"status": "archived",
"archived_date": "2024-06-11"
},
"filters": [
{"field": "last_login", "operator": "lt", "value": "2023-01-01"},
{"field": "status", "operator": "eq", "value": "inactive"}
]
}
Delete OperationsDelete Specific Record:{
"filters": [
{"field": "id", "operator": "eq", "value": 123},
{"field": "user_id", "operator": "eq", "value": "current_user_id"}
]
}
Conditional Delete:{
"filters": [
{"field": "status", "operator": "eq", "value": "draft"},
{"field": "created_at", "operator": "lt", "value": "2024-01-01"}
]
}
Real-time Setup & ConfigurationEnable Realtime in Supabase:1. Go to "Database" > "Replication" in Supabase dashboard
2. Enable replication for your table
3. Or run: ALTER PUBLICATION supabase_realtime ADD TABLE your_table;
Element Configuration:• Check "Enable Realtime?"
• Set unique "Realtime Topic ID" (e.g., "user_123_orders", "team_456_tasks")
• Use different topic IDs for different data subscriptions
Real-time Events:• "Realtime Insert": New record added
• "Realtime Update": Existing record modified
• "Realtime Delete": Record removed
Row Level Security (RLS) SetupEnable RLS:ALTER TABLE your_table ENABLE ROW LEVEL SECURITY;
Basic User Policies:-- Users can only see their own data
CREATE POLICY "Users see own data" ON your_table
FOR ALL TO authenticated
USING (auth.uid() = user_id);
-- Users can insert their own data
CREATE POLICY "Users insert own data" ON your_table
FOR INSERT TO authenticated
WITH CHECK (auth.uid() = user_id);
Advanced Policies:-- Admins can see all data
CREATE POLICY "Admins see all" ON your_table
FOR ALL TO authenticated
USING (auth.jwt() ->> 'role' = 'admin');
-- Team members see team data
CREATE POLICY "Team members see team data" ON your_table
FOR SELECT TO authenticated
USING (team_id IN (
SELECT team_id FROM user_teams
WHERE user_id = auth.uid()
));
Supabase RPC Function Element - Complete GuidePurpose & Capabilities• Execute custom PostgreSQL functions with complex business logic
• Perform multi-table operations atomically
• Complex calculations and data aggregations
• Batch operations for data processing
• Security-sensitive operations on the database level
• Custom validation and data transformation
Creating RPC FunctionsSimple Analytics Function:CREATE OR REPLACE FUNCTION get_user_analytics(user_id UUID)
RETURNS JSON AS $$
DECLARE
result JSON;
BEGIN
SELECT json_build_object(
'total_orders', COUNT(o.id),
'total_spent', COALESCE(SUM(o.total), 0),
'avg_order_value', COALESCE(AVG(o.total), 0),
'last_order_date', MAX(o.created_at),
'favorite_category', (
SELECT category FROM order_items oi
JOIN orders o2 ON oi.order_id = o2.id
WHERE o2.user_id = $1
GROUP BY category
ORDER BY COUNT(*) DESC
LIMIT 1
)
) INTO result
FROM orders o
WHERE o.user_id = $1 AND o.status = 'completed';
RETURN result;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
Batch User Operations:CREATE OR REPLACE FUNCTION bulk_update_users(
user_ids UUID[],
new_status TEXT,
admin_user_id UUID
)
RETURNS JSON AS $$
DECLARE
updated_count INTEGER;
result JSON;
BEGIN
-- Verify admin permission
IF NOT EXISTS (
SELECT 1 FROM users
WHERE id = admin_user_id AND role = 'admin'
) THEN
RAISE EXCEPTION 'Insufficient permissions';
END IF;
-- Update users
UPDATE users
SET status = new_status, updated_at = NOW()
WHERE id = ANY(user_ids);
GET DIAGNOSTICS updated_count = ROW_COUNT;
-- Log action
INSERT INTO admin_logs (admin_id, action, details)
VALUES (admin_user_id, 'bulk_update_users',
json_build_object('updated_count', updated_count, 'new_status', new_status)
);
SELECT json_build_object(
'success', true,
'updated_count', updated_count
) INTO result;
RETURN result;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
Element Setup1. Create your function in Supabase SQL Editor first
2. Add "Supabase RPC Function" element to your page
3. Set "Type of returned objects" to match your function's return type
4. Enter exact function name in "Function name" field
Function Call ExamplesUser Analytics Call:{
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}
Bulk Operations Call:{
"user_ids": ["user1-uuid", "user2-uuid", "user3-uuid"],
"new_status": "suspended",
"admin_user_id": "admin-uuid"
}
Complex Search Function:{
"search_term": "productivity software",
"categories": ["saas", "tools", "productivity"],
"price_range": {"min": 10, "max": 100},
"features": ["api", "integrations", "mobile"],
"sort_by": "popularity",
"location": "US",
"include_reviews": true
}
Date Range Analytics:{
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"group_by": "month",
"metrics": ["revenue", "users", "orders"],
"filters": {
"subscription_type": "premium",
"region": "north_america"
}
}
Supabase Edge Function Element - Complete GuidePurpose & Capabilities• Execute server-side TypeScript/JavaScript functions globally
• Third-party API integrations (Stripe, SendGrid, Twilio, etc.)
• Heavy computations and data processing
• Webhook endpoints for external services
• Custom authentication flows
• File processing and transformations
• Email/SMS sending and notifications
Deploying Edge FunctionsUsing Supabase CLI:# Install Supabase CLI
npm install -g supabase
# Login to Supabase
supabase login
# Initialize project
supabase init
# Create new function
supabase functions new my-function
# Deploy function
supabase functions deploy my-function
Element Setup1. Deploy your Edge Function to Supabase first
2. Add "Supabase Edge Function" element to your page
3. Set "Type of returned objects" for the response data
4. Enter exact function name
Function ExamplesPayment Processing:{
"body": {
"amount": 2999,
"currency": "usd",
"customer_id": "cust_123456789",
"payment_method": "card_987654321",
"description": "Premium subscription",
"metadata": {
"user_id": "bubble_user_123",
"plan": "premium_yearly"
}
},
"options": {
"headers": {
"Authorization": "Bearer user_token_here",
"Content-Type": "application/json"
}
}
}
Email Campaign:{
"body": {
"template_id": "welcome_series_001",
"recipients": [
{"email": "[color=#0205d3][[email protected]][email protected][/email][/color]", "name": "John Doe"},
{"email": "[color=#0205d3][[email protected]][email protected][/email][/color]", "name": "Jane Smith"}
],
"variables": {
"company_name": "Acme Corp",
"offer_code": "WELCOME20",
"expires_at": "2024-12-31"
},
"sender": {
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"name": "Your App Team"
}
}
}
Data Processing & ETL:{
"body": {
"source_url": "[color=#0205d3][url=https://api.external-service.com/data.json]https://api.external-service.com/data.json[/url][/color]",
"processing_type": "clean_and_transform",
"output_format": "normalized_json",
"transformations": [
"remove_duplicates",
"validate_emails",
"standardize_phone_numbers",
"geocode_addresses"
],
"destination": {
"table": "processed_leads",
"upsert_key": "email"
}
}
}
File Processing:{
"body": {
"file_url": "[color=#0205d3][url=https://storage.supabase.co/bucket/file.pdf]https://storage.supabase.co/bucket/file.pdf[/url][/color]",
"operations": [
{"type": "extract_text"},
{"type": "analyze_sentiment"},
{"type": "generate_summary", "max_length": 500}
],
"output_bucket": "processed-documents",
"notify_webhook": "[color=#0205d3][url=https://yourapp.com/webhooks/file-processed]https://yourapp.com/webhooks/file-processed[/url][/color]"
}
}
Third-Party Integration:{
"body": {
"service": "salesforce",
"action": "create_lead",
"data": {
"firstName": "John",
"lastName": "Doe",
"email": "[color=#0205d3][[email protected]][email protected][/email][/color]",
"company": "Acme Corp",
"source": "website_signup"
},
"options": {
"assign_to": "sales_team_lead",
"send_notification": true
}
},
"options": {
"headers": {
"X-API-Source": "bubble-app",
"Authorization": "Bearer sf_token_here"
}
}
}
Supabase Storage Element - Complete GuidePurpose & Capabilities• Professional file storage with global CDN delivery
• Image transformations (resize, crop, optimize, format conversion)
• Document management with access controls
• Media galleries with automatic thumbnail generation
• Backup and archival systems
• Large file uploads with resumable transfers
• File versioning and metadata management
Element Setup1. Add "Supabase Storage" element to your page
2. Set "Bucket data type" to "Bucket (Supabase Plugin)"
3. Set "File data type" to "File (Supabase Plugin)"
4. Create buckets either in Supabase dashboard or via plugin actions
Bucket ManagementCreate Public Bucket (for images, public files):• Bucket Name: "product-images"
• Is bucket public?: true
• Allowed MIME types: "image/jpeg,image/png,image/webp,image/gif"
• File Size Limit: 5242880 (5MB in bytes)
Create Private Bucket (for documents, user files):• Bucket Name: "user-documents"
• Is bucket public?: false
• Allowed MIME types: "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
• File Size Limit: 52428800 (50MB in bytes)
File Upload ExamplesUser Avatar Upload:• Bucket: "user-avatars"
• File Path: "avatars/user_123.jpg"
• File Data: (from file uploader element)
• Upsert: true (to replace existing avatar)
Document Upload with Folder Structure:• Bucket: "company-docs"
• File Path: "contracts/2024/client_abc/contract_v2.pdf"
• File Data: (from file uploader element)
• Upsert: false (to prevent accidental overwrites)
Signed URL GenerationShort-term Access (1 hour):• Bucket: "private-documents"
• File Path: "user_123/invoice_456.pdf"
• Expires In: 3600 (1 hour in seconds)
Long-term Access (24 hours):• Bucket: "shared-files"
• File Path: "reports/monthly_report_june.xlsx"
• Expires In: 86400 (24 hours in seconds)
File Access Control with RLSBasic User File Access:-- Enable RLS on storage objects
ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY;
-- Users can upload to their own folder
CREATE POLICY "Users can upload own files" ON storage.objects
FOR INSERT TO authenticated
WITH CHECK (
bucket_id = 'user-files' AND
(storage.foldername(name))[1] = auth.uid()::text
);
-- Users can view their own files
CREATE POLICY "Users can view own files" ON storage.objects
FOR SELECT TO authenticated
USING (
bucket_id = 'user-files' AND
(storage.foldername(name))[1] = auth.uid()::text
);
-- Users can delete their own files
CREATE POLICY "Users can delete own files" ON storage.objects
FOR DELETE TO authenticated
USING (
bucket_id = 'user-files' AND
(storage.foldername(name))[1] = auth.uid()::text
);
Team-based File Access:-- Team members can access team files
CREATE POLICY "Team file access" ON storage.objects
FOR ALL TO authenticated
USING (
bucket_id = 'team-files' AND
(storage.foldername(name))[1] IN (
SELECT team_id::text FROM user_teams
WHERE user_id = auth.uid()
)
);
Public vs Private File StrategiesPublic Files (no authentication required):• Product images, logos, marketing materials
• Blog post images and media
• Public documents and resources
• Use public buckets with direct URLs
Private Files (authentication required):• User documents and personal files
• Subscription-gated content
• Sensitive business documents
• Use private buckets with signed URLs
Image Transformation (via URL parameters):# Original image
[color=#0205d3][url=https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg]https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg[/url][/color]
# Resized to 300x200
[color=#0205d3][url=https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg?width=300&height=200]https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg?width=300&height=200[/url][/color]
# Auto-optimized WebP
[color=#0205d3][url=https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg?format=webp&quality=80]https://abc123.supabase.co/storage/v1/object/public/images/photo.jpg?format=webp&quality=80[/url][/color]
Server Actions - Advanced SecuritySupabase RPC Function (Server)• Execute RPC functions with elevated privileges
• Hide function names and parameters from client-side
• Perfect for admin operations, data migrations, sensitive calculations
• Pass "User JWT Token" field with Current User's "Supabase access token"
Supabase Edge Function (Server)• Execute Edge Functions server-side
• Secure API integrations with hidden credentials
• Payment processing with server-side validation
• Pass "User JWT Token" for user context
When to Use Server Actions:• Admin-only operations
• Payment processing
• Sensitive data operations
• Third-party API calls with secrets
• Compliance-critical functions
Security Best PracticesRow Level Security (RLS)• Always enable RLS on production tables
• Create specific policies for different user roles
• Test policies thoroughly before deployment
• Use auth.uid() for user-specific data access
• Implement admin policies separately from user policies
Authentication Security• Use strong password requirements
• Implement multi-factor authentication for sensitive apps
• Set appropriate session timeouts
• Use signed URLs for temporary file access
• Never expose service_role key in client code
API Security• Validate all inputs in Edge Functions and RPC functions
• Use proper error handling to avoid information leakage
• Implement rate limiting for public endpoints
• Use HTTPS for all communications
• Regular security audits and updates
Data Protection• Encrypt sensitive data at application level
• Use appropriate data types for different information
• Implement data retention policies
• Regular backups and disaster recovery planning
• GDPR compliance for users
Development WorkflowEnvironment Setup• Use separate Supabase projects for development/staging/production
• Implement proper migration strategies
• Version control your database schema
• Use environment variables for configuration
• Set up automated testing for critical functions
Deployment Best Practices• Test all changes in staging environment first
• Use database migrations for schema changes
• Implement rollback strategies
• Monitor error logs and performance metrics
• Set up alerts for critical issues
Debugging & Monitoring• Use Supabase dashboard for real-time monitoring
• Implement proper logging in Edge Functions
• Set up error tracking and alerting
• Monitor API usage and performance
• Regular security audits and reviews
Advanced Integration PatternsMulti-tenant Applications• Use RLS policies for tenant isolation
• Implement proper data partitioning
• Use consistent tenant identification
• Consider performance implications of multi-tenancy
Microservices Architecture• Use Edge Functions as microservices
• Implement proper service communication
• Use event-driven architecture with webhooks
• Consider data consistency across services
Real-time Collaboration• Implement presence tracking
• Use real-time for live updates
• Handle conflict resolution
• Consider scalability for large teams
Troubleshooting GuideAuthentication Issues"Invalid API key" Error:• Check Supabase URL format (should include https://)
• Verify anon key is copied correctly (starts with "eyJ")
• Ensure no extra spaces or characters
• Confirm project is active in Supabase dashboard
"User not found" Error:• Verify email address exists in auth.users table
• Check if user needs to confirm email
• Verify RLS policies allow user access
• Check if user account is active
OAuth Issues:• Verify OAuth provider is enabled in Supabase
• Check OAuth credentials are correct
• Ensure redirect URLs match exactly
• Test OAuth flow in incognito mode
Database Issues"Permission denied" Error:• Check if RLS is enabled on the table
• Verify RLS policies allow the operation
• Ensure user is authenticated
• Check if user has correct role/permissions
"Relation does not exist" Error:• Verify table name spelling and case
• Check if table exists in Supabase dashboard
• Ensure you're connecting to correct project
• Verify schema if using custom schemas
"Invalid JSON" Error:• Validate JSON syntax using online validator
• Check for missing quotes around strings
• Verify proper array and object formatting
• Escape special characters properly
Real-time IssuesNo Real-time Updates:• Enable realtime for table in Supabase dashboard
• Check unique topic ID is set
• Verify RLS policies allow realtime access
• Test with simple insert/update operations
• Check browser console for WebSocket errors
Multiple Connections:• Ensure unique topic IDs for different subscriptions
• Implement proper cleanup on page unload
• Check for memory leaks in browser dev tools
• Consider connection pooling for high-traffic apps
Storage Issues"Bucket not found" Error:• Verify bucket name spelling and case
• Check if bucket exists in Supabase dashboard
• Create bucket first before file operations
• Verify bucket permissions and RLS policies
"File upload failed" Error:• Check file size against bucket limits
• Verify MIME type is allowed in bucket settings
• Ensure user has upload permissions
• Check available storage quota
• Verify file is not corrupted
"Access denied" for Files:• Check RLS policies on storage.objects table
• Verify user authentication
• Ensure proper file path structure
• Check bucket public/private settings
Function IssuesRPC Function Errors:• Verify function exists in Supabase
• Check function parameter types match
• Test function directly in Supabase SQL editor
• Verify function permissions and SECURITY DEFINER
• Check for SQL syntax errors in function
Edge Function Errors:• Verify function is deployed to Supabase
• Check function logs in Supabase dashboard
• Test function with curl or Postman
• Verify environment variables are set
• Check for TypeScript/JavaScript errors
Performance TroubleshootingSlow Queries:• Check query execution plan in Supabase
• Add indexes for frequently filtered columns
• Optimize JOIN operations
• Use LIMIT and pagination for large datasets
• Consider denormalizing data for read-heavy operations
High Memory Usage:• Implement pagination for large data sets
• Clean up unused realtime subscriptions
• Optimize image sizes and formats
• Use efficient data structures
• Monitor memory usage in browser dev tools
Slow File Uploads:• Check file sizes and optimize if needed
• Use appropriate image compression
• Consider chunked uploads for large files
• Verify network connectivity
• Use multiple upload endpoints for large files
Resources & SupportOfficial Documentation•
https://supabase.com/docs - Complete Supabase documentation
•
https://supabase.com/docs/guides/auth - Authentication guides
•
https://supabase.com/docs/guides/database - Database guides
•
https://supabase.com/docs/guides/storage - Storage guides
•
https://supabase.com/docs/guides/functions - Edge Functions guides
Bubble Resources•
https://manual.bubble.io/ - Bubble manual
Plugin Support•
https://x.com/PrashantAbbi - Direct plugin support
•
mailto:[email protected] - Email support
Useful Tools•
https://jsonlint.com/ - JSON validator
•
https://sqliteonline.com/ - SQL query tester
•
https://regex101.com/ - Regular expression tester
• Supabase CLI for local development
• Postman for API testing
Impersonate User (Magic Link) - Server Action• Instantly generate a secure, one-time login (magic) link for any user by email.
• Perfect for admin impersonation, support, or user onboarding flows.
•
No password required – just the user's email.
• Optionally specify a
Redirect URL to control where the user lands after clicking the link (e.g., your dashboard or onboarding page).
• The action returns the
magic_link (URL). You can display it, email it, or use it in workflows.
How to use:1. Use the "Supabase Impersonate User (Server)" action in your workflow.
2. Provide the user's email address.
3. (Optional) Provide a Redirect URL (e.g.,
https://yourapp.com/dashboard).
4. The action returns a
magic_link (URL). When visited, it will log in as that user and redirect to your specified URL.
Example Output:{
"magic_link": "[color=#0205d3][url=https://your-supabase-project.supabase.co/auth/v1/verify?token=...&type=magiclink&redirect_to=https://yourapp.com/dashboard]https://your-supabase-project.supabase.co/auth/v1/verify?token=...&type=magiclink&redirect_to=https://yourapp.com/dashboard[/url][/color]",
"error_message": null
}
Security Note:• Only use this action on the server side with proper admin permissions.
• Never expose your Supabase service role key to the client.
• Magic links are single-use and expire after a short period for security.
This plugin is open source and community-driven. Contributions, feedback, and feature requests are always welcome!Last Updated: June 2024
Compatibility: All Bubble plans
License: Open Source (MIT)