Menu

Native Google and Apple Sign-In in Expo with Supabase (No Browser Redirects)
πŸ“°

Native Google and Apple Sign-In in Expo with Supabase (No Browser Redirects)

DEV Community: reactnativeΒ·Hugo RusΒ·about 2 hours ago
#Gq0KxPjA
#devtoreactnative#devto#dev#apple#google
Reading 0:00
15s threshold

the smoothest social login in an Expo + Supabase app doesn't open a browser at all. Use the native sign-in sheet on each platform ( expo-apple-authentication for Apple, the Google Sign-In SDK for Google), take the ID token it returns, and pass it to supabase.auth.signInWithIdToken() . Most of the work is configuration: client IDs in Supabase, the right SHA-1 fingerprints on Android, and one setting for nonce errors on iOS.

There are two ways to add Google or Apple login to a mobile app with Supabase:

Browser-based OAuth: open a web page, sign in, redirect back to the app with a deep link.

Native ID token sign-in: show the platform's own sign-in UI, get an ID token, exchange it for a Supabase session.

The first works, but users see a browser pop up, sometimes have to sign in again, and redirects can fail in ways that are hard to debug. The second feels like part of your app: a Face ID sheet for Apple, a native account picker for Google.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.