Tech
How to share Supabase auth between Next.js and Expo (one client, both platforms)
Most teams building a web + mobile product end up with two auth integrations that slowly drift apart. You don't need that. Here's how to run a single Supabase auth layer across a Next.js web app and an Expo mobile app in a monorepo β including the gotchas nobody warns you about.
1. Keep the Supabase client framework-agnostic
Depend only on @supabase/supabase-js . Expose a factory that takes the storage adapter as an argument:
export function createSupabaseClient({ url, ano...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to