supa-seed
Version:
A constraint-aware, framework-agnostic database seeding framework with deep PostgreSQL business logic discovery and MakerKit integration support
21 lines • 1.03 kB
TypeScript
/**
* Enhanced Supabase client creator that handles JWT validation issues in local environments.
*
* This addresses the core JWT signature validation problem where service role keys
* fail authentication in local Supabase environments while anon keys work perfectly.
*
* The fix implements unified JWT validation by:
* 1. Detecting local Supabase environments
* 2. Using enhanced client options that handle both anon and service role keys consistently
* 3. Providing fallback authentication mechanisms for development
*/
export declare function createEnhancedSupabaseClient(url: string, key: string, options?: any): import("@supabase/supabase-js").SupabaseClient<any, "public", any>;
/**
* Check if a JWT token is a service role key (for better error messages)
*/
export declare function isServiceRoleKey(token: string): boolean;
/**
* Check if this is a local Supabase environment
*/
export declare function isLocalSupabaseEnvironment(url: string): boolean;
//# sourceMappingURL=enhanced-supabase-client.d.ts.map