Share:
React Native Google Sign-In: Supabase 2026 Guide
Published: February 11, 2026 | Reading Time: 11 minutes
About the Author
Emachalan is a Full-Stack Developer specializing in MEAN & MERN Stack, focused on building scalable web and mobile applications with clean, user-centric code.
Key Takeaways
- Complete iOS/Android Implementation: End-to-end Google Sign-In + Supabase auth works seamlessly for iOS 12+ and Android 6.0+ from a single React Native codebase.
- DEVELOPER_ERROR Fix: Always use Web Client ID in React Native code—never Android/iOS Client IDs. Most common authentication failure resolved.
- Server-Side Token Security: Supabase validates Google tokens against public keys before session creation—more secure than client-only OAuth flows.
- SHA-1 Fingerprint Critical: 25% of auth failures from fingerprint mismatches. Configure separate debug/release/Play Store fingerprints in Google Cloud Console.
- Production OAuth Setup: Requires 3 Client IDs (Web/Android/iOS) + iOS Info.plist URL schemes + real device testing before app store submission.
- Cross-Platform Single Codebase: signInWithGoogle() function works identically on iOS/Android—no platform-specific branching needed for production auth.
Introduction
Google Sign-In is the most requested authentication method in mobile applications, offering users a seamless one-tap login experience without creating new passwords. However, integrating Google Sign-In with Supabase in React Native creates specific challenges that can cost development teams days of debugging time—especially the notorious DEVELOPER_ERROR on Android that provides zero useful error information.
At AgileSoftLabs, we've shipped 50+ React Native applications with production authentication systems across iOS and Android platforms. Through this experience, we've encountered every edge case, configuration pitfall, and platform-specific quirk in the Google Sign-In React Native Supabase integration. This guide distills those lessons into a step-by-step implementation that you can follow to build secure, reliable authentication in your mobile app.
Whether you're building a new app or migrating from Firebase Auth, this comprehensive guide covers everything from Google Cloud Console setup to production deployment checklists. You'll learn how to configure OAuth credentials correctly, implement the authentication flow with proper error handling, and avoid the common mistakes that cause silent failures in production. Learn more about our mobile app development services and how we help teams ship faster.
Why Google Sign-In with Supabase? (Architecture Overview)
Understanding the architecture behind React Native Google authentication with Supabase is crucial before diving into implementation. Unlike traditional username/password authentication, OAuth-based sign-in involves multiple parties: your React Native app, the Google SDK on the user's device, Google's authentication servers, and Supabase's backend.
The Authentication Flow
Here's exactly what happens when a user taps "Sign in with Google" in your React Native app integrated with Supabase:
- User taps "Sign in with Google."
- Google SDK shows consent screen
- User grants permission → Google returns ID Token
- React Native sends ID Token to Supabase
- Supabase verifies token with Google (server-side)
- Supabase creates/updates user → Returns JWT session
- App stores session → User authenticated
This server-side verification is what makes Supabase Google OAuth more secure than client-only OAuth implementations. Your app never validates tokens itself—Supabase handles all cryptographic verification against Google's public keys, ensuring that even if an attacker intercepts the ID token, they cannot forge authentication.
For enterprise applications requiring additional security layers, explore our IT asset management software and incident management solutions to track authentication events and security incidents.
Why Supabase Over Firebase Auth or Auth0?
| Feature | Supabase | Firebase Auth | Auth0 |
|---|---|---|---|
| Pricing Model | Free tier: 50K MAU, then pay-as-you-go | Free tier: unlimited auth, pay for other services | Free: 7K active users/month |
| Open Source | Yes (MIT license) | No | No |
| Row Level Security | Built-in PostgreSQL RLS | Security Rules (separate system) | Requires custom middleware |
| Self-Hostable | Yes (Docker) | No | No |
| React Native SDK | Official (@supabase/supabase-js) | Official (react-native-firebase) | Community-maintained |
| PostgreSQL Access | Direct SQL access + REST API | Firestore only (NoSQL) | No database included |
For teams building data-intensive applications, Supabase's combination of authentication and PostgreSQL database with Row Level Security provides a complete backend solution. The open-source nature also means you can inspect the code, self-host for compliance requirements, and avoid vendor lock-in.
Prerequisites and Setup Checklist
Before implementing React Native Google authentication with Supabase, you need to set up accounts and install the correct library versions. Mismatched versions are a common source of cryptic errors.
Required Accounts and Tools
• Google Cloud Console account: Required to create OAuth 2.0 credentials for Web, Android, and iOS platforms
• Supabase project: Create a free project at supabase.com with Google provider enabled in Authentication settings
• React Native 0.73+: Older versions may work, but are not officially supported
• Node.js 18+: Required for modern npm package resolution
• Xcode 15+ (for iOS): Includes Swift 5.9+ required by the latest native dependencies
• Android Studio (for Android): With Android SDK 33+ and build tools 33.0.0+
Library Versions (Compatibility Matrix)
| Package | Version | Notes |
|---|---|---|
| @react-native-google-signin/google-signin | 12.x | Required for React Native 0.73+, breaking changes from v10 |
| @supabase/supabase-js | 2.x | Use with AsyncStorage adapter for session persistence |
| @react-native-async-storage/async-storage | 1.x | Required for Supabase session storage in React Native |
| react-native | 0.73+ | New Architecture compatible, recommended for new projects |
Breaking Changes Warning: @react-native-google-signin/google-signin v12+ has breaking changes from v10. The configure() API changed significantly—it now requires explicit configuration and no longer auto-detects some platform settings.
Step 1: Configure Google Cloud Console
The Google Cloud Console configuration is where most Google Sign-In React Native Supabase implementations fail. You need three different types of OAuth 2.0 Client IDs, and using the wrong one in the wrong place causes DEVELOPER_ERROR with no helpful error messages.
Create OAuth 2.0 Credentials
- Navigate to APIs & Services > Credentials in your Google Cloud Console project
- Click Create Credentials > OAuth 2.0 Client ID
- Create a Web application client ID first—this is your most important credential for Supabase
- Add your Supabase redirect URI (found in Supabase Dashboard > Authentication > Providers > Google) to the Authorized redirect URIs field
- Create an Android client ID with your app's package name and SHA-1 fingerprint (both debug and release)
- Create an iOS client ID with your app's bundle identifier
- Configure the OAuth consent screen with your app name, support email, and logo (required before users can sign in)
Understanding Client IDs: Web vs Android vs iOS
| Client ID Type | Created For | Used In Supabase Dashboard? | Used In React Native Code? |
|---|---|---|---|
| Web Client ID | General OAuth (ends in .apps.googleusercontent.com) | YES — Paste into Google provider settings | YES — Use as webClientId in GoogleSignin.configure() |
| Android Client ID | Your app's package name + SHA-1 fingerprint | NO | NO — Auto-detected by Google Play Services |
| iOS Client ID | Your app's bundle identifier | NO | YES — Only in Info.plist URL scheme (reversed) |
DEVELOPER_ERROR Root Cause #1: The #1 cause of DEVELOPER_ERROR is using the Android Client ID instead of the Web Client ID in your React Native code. Always use the Web Client ID for the webClientId parameter in GoogleSignin.configure()—this is required for Supabase's server-side token verification.
Generate SHA-1 Fingerprints
Android requires SHA-1 certificate fingerprints to verify your app's identity. You need fingerprints for both debug builds (during development) and release builds (for production).
Debug SHA-1 (for development):
# Run from your React Native project root
cd android && ./gradlew signingReport
# Look for the SHA1 fingerprint under "Variant: debug"
# It looks like: A1:B2:C3:D4:E5:F6:G7:H8:I9:J0:K1:L2:M3:N4:O5:P6:Q7:R8:S9:T0
Alternative method using keytool:
# For debug builds, React Native uses Android's default debug keystore
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
# On Windows, the keystore is at:
# %USERPROFILE%\.android\debug.keystore
Release SHA-1 (for production):
# If you have a release keystore configured
keytool -list -v -keystore path/to/your-release-key.keystore -alias your-key-alias
# You'll be prompted for the keystore password
# Copy the SHA1 fingerprint from the output
Add both debug and release SHA-1 fingerprints to your Android Client ID in Google Cloud Console. If you're using Google Play App Signing, you'll also need to add the SHA-1 from the Play Console.
Step 2: Configure Supabase Auth Provider
With Google Cloud Console configured, the next step in your Supabase Google OAuth setup is configuring the Google provider in your Supabase project. This is where Supabase gets the credentials needed to verify ID tokens from Google.
Enable Google Provider in Dashboard
- Navigate to Authentication > Providers in your Supabase project dashboard
- Find Google in the provider list and click to expand the configuration panel
- Toggle Enable Sign in with Google to ON
- Paste your Web Client ID from Google Cloud Console into the Client ID field
- Paste your Web Client Secret from Google Cloud Console into the Client Secret field
- Copy the Callback URL shown in the Supabase dashboard (format:
https://yourproject.supabase.co/auth/v1/callback) - Click Save to apply the configuration
Redirect URI Configuration
The redirect URI (also called callback URL) is critical for Google Sign-In React Native Supabase implementations. After users authenticate with Google, Google redirects back to this URL with an authorization code. Supabase exchanges this code for user information.
Go back to Google Cloud Console > Credentials > your Web Client ID > Authorized redirect URIs, and add the exact callback URL you copied from Supabase. It must match character-for-character, including the https:// protocol and the /auth/v1/callback path.
Real-World Experience: On a recent project, our team spent 3 hours debugging a 'redirect_uri_mismatch' error. The cause? We'd copied the redirect URI from the Supabase dashboard but accidentally missed the trailing path segment when pasting it into Google Cloud Console. Supabase's redirect URI format is: https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback—make sure you copy the FULL URI, including the /auth/v1/callback path.
Step 3: React Native Implementation
Now comes the core implementation: integrating the Google Sign-In SDK with Supabase in your React Native codebase. This section provides production-ready code for Google Sign-In React Native Supabase that handles errors, manages sessions, and works on both iOS and Android.
Install Dependencies
npm install @react-native-google-signin/google-signin @supabase/supabase-js @react-native-async-storage/async-storage
# For iOS, install CocoaPods dependencies
cd ios && pod install && cd ..
# Verify installation
npm list @react-native-google-signin/google-signin
# Should show version 12.x or higher
Configure Supabase Client
// src/lib/supabase.ts
import AsyncStorage from '@react-native-async-storage/async-storage';
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = 'https://YOUR_PROJECT_REF.supabase.co';
const supabaseAnonKey = 'YOUR_ANON_KEY';
export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
auth: {
storage: AsyncStorage,
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: false,
},
});
The detectSessionInUrl: false Option is important for React Native—it's a web-only feature that causes errors in mobile environments. The The autoRefreshToken: true setting ensures Supabase automatically refreshes JWT sessions before they expire.
Configure GoogleSignin
// src/config/google.ts
import { GoogleSignin } from '@react-native-google-signin/google-signin';
GoogleSignin.configure({
webClientId: 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com',
offlineAccess: true,
scopes: ['profile', 'email'],
});
The offlineAccess: true option requests a refresh token from Google, allowing your app to maintain long-term access. The scopes array defines what user information you're requesting—start with just profile and email for basic authentication.
Security Warning: Never hardcode your webClientId directly in source code for production apps. Use environment variables via react-native-config or a .env file excluded from version control.
Implement the Sign-In Function
// src/auth/google.ts
import { GoogleSignin, statusCodes } from '@react-native-google-signin/google-signin';
import { supabase } from '../lib/supabase';
export async function signInWithGoogle() {
try {
// Check if Google Play Services are available (Android)
await GoogleSignin.hasPlayServices();
// Trigger Google Sign-In flow
const signInResult = await GoogleSignin.signIn();
// Extract the ID token
const idToken = signInResult?.data?.idToken;
if (!idToken) {
throw new Error('No ID token received from Google Sign-In');
}
// Send ID token to Supabase for verification
const { data, error } = await supabase.auth.signInWithIdToken({
provider: 'google',
token: idToken,
});
if (error) throw error;
console.log('Successfully signed in:', data.user.email);
return data;
} catch (error: any) {
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
console.log('User cancelled the sign-in flow');
} else if (error.code === statusCodes.IN_PROGRESS) {
console.log('Sign-in already in progress');
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
console.log('Google Play Services not available');
} else {
console.error('Google Sign-In error:', error);
}
throw error;
}
}
The critical part is supabase.auth.signInWithIdToken()—This is what makes Supabase Google OAuth work. Instead of handling OAuth tokens yourself, you pass the ID token to Supabase, which verifies it server-side and creates a session.
Organizations can leverage our AI & machine learning solutions to enhance authentication systems with intelligent user behavior analysis and fraud detection. For customer-facing applications, consider integrating AI agents to provide conversational support during the authentication process.
Step 4: iOS-Specific Configuration
iOS requires additional configuration in your Info.plist file for React Native Google authentication with Supabase to work. Without this step, the Google Sign-In flow will open but immediately close with no error messages in the console.
Info.plist URL Schemes
Add a URL scheme to your iOS app's Info.plist file using your reversed iOS Client ID from Google Cloud Console. Open ios/YourApp/Info.plist and add this configuration:
<!-- ios/YourApp/Info.plist -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.YOUR_IOS_CLIENT_ID</string>
</array>
</dict>
</array>
Replace YOUR_IOS_CLIENT_ID with the actual iOS Client ID from Google Cloud Console (the long numeric string before .apps.googleusercontent.com).
After editing Info.plist, rebuild your iOS app completely:
# Clean and rebuild iOS app
cd ios
rm -rf build
pod install
cd ..
npx react-native run-ios
Silent iOS Crash Trap: iOS will crash silently without the URL scheme configured—you won't see an error message in the Metro console or Xcode debugger. The Google Sign-In screen appears, the user taps their account, then the screen immediately dismisses with no feedback. If you're experiencing this symptom, check Info.plist first.
For healthcare applications requiring HIPAA compliance, consider our CareSlot AI platform with built-in secure authentication. E-commerce applications can benefit from EngageAI for customer engagement tracking post-authentication.
Step 5: Android-Specific Configuration
Android configuration for React Native Google authentication with Supabase is where most teams encounter the infamous DEVELOPER_ERROR. This section provides a comprehensive guide to every cause and solution we've identified across 50+ production apps.
Fixing DEVELOPER_ERROR (The Complete Guide)
DEVELOPER_ERROR is the single most frustrating error in Google Sign-In React Native Supabase integration. The error gives zero useful information—it just says "DEVELOPER_ERROR" with error code 10 and no stack trace.
| Cause | Symptom | Fix | How to Verify |
|---|---|---|---|
| Wrong Client ID type | DEVELOPER_ERROR on every sign-in attempt | Use Web Client ID in webClientId parameter, not Android Client ID | Check Google Cloud Console > Credentials — Web type ends in .apps.googleusercontent.com |
| SHA-1 mismatch (debug) | Works on emulator, fails on physical device | Run ./gradlew signingReport, add debug SHA-1 to Google Console | Compare SHA-1 in Google Console vs keytool output |
| SHA-1 mismatch (release) | Works in debug build, fails in release build | Add release keystore SHA-1 to Google Console Android credentials | Build release APK with ./gradlew assembleRelease and test |
| Google Play signing | Works locally, fails for users from Play Store | Add Google Play's upload certificate SHA-1 from Play Console | Check Play Console > Setup > App signing for upload cert SHA-1 |
| Package name mismatch | DEVELOPER_ERROR on all builds | Verify package name in Google Console matches applicationId in build.gradle | Compare android/app/build.gradle applicationId vs Google Console |
The most common fix: verify you're using the Web Client ID. We estimate 70% of DEVELOPER_ERROR cases are caused by using the wrong Client ID type. The second most common cause is SHA-1 fingerprint mismatches, accounting for about 25% of cases.
For complex authentication requirements, explore our custom software development services for tailored solutions.
Common Errors and Troubleshooting
| Error Message | Platform | Root Cause | Solution |
|---|---|---|---|
| DEVELOPER_ERROR (code 10) | Android | Wrong Client ID type or SHA-1 mismatch | Use Web Client ID; verify SHA-1 fingerprints match in Google Console |
| SIGN_IN_CANCELLED (code 12501) | Both | User dismissed the Google consent screen | Handle gracefully in UI; don't show error toast (expected behavior) |
| NETWORK_ERROR (code 7) | Both | No internet or Google servers unreachable | Check connectivity; implement retry with exponential backoff |
| invalid_grant | Supabase | ID token expired or already used | Get fresh token from GoogleSignin.signIn(); don't cache ID tokens |
| redirect_uri_mismatch | Both | Callback URL mismatch between Supabase and Google | Copy exact URI from Supabase dashboard to Google Console |
| App crashes silently on iOS | iOS | Missing URL scheme in Info.plist | Add CFBundleURLSchemes with reversed iOS Client ID |
| PLAY_SERVICES_NOT_AVAILABLE | Android | Android emulator without Google Play Services | Use emulator with Google APIs or test on physical device |
Debugging Tips
When troubleshooting issues, detailed logging helps identify exactly where the flow fails:
// Enable detailed logging during development
const result = await GoogleSignin.signIn();
console.log('Google Sign-In result:', JSON.stringify(result, null, 2));
// Log the ID token (NEVER log in production!)
console.log('ID Token present:', !!result?.data?.idToken);
console.log('ID Token length:', result?.data?.idToken?.length);
// Verify Supabase response
const { data, error } = await supabase.auth.signInWithIdToken({
provider: 'google',
token: result.data.idToken,
});
console.log('Supabase auth result:', { user: data?.user?.id, error });
Remove all token logging before deploying to production—ID tokens are sensitive credentials that should never be logged.
Production Deployment Checklist
Before shipping your Google Sign-In React Native Supabase implementation to production, complete this checklist:
1. Add Google Play App Signing SHA-1 to Google Cloud Console: If you're using Google Play App Signing, add the SHA-1 certificate fingerprint from Play Console > Setup > App signing
2. Move OAuth consent screen to "Production": In Google Cloud Console, your OAuth consent screen starts in "Testing" mode, which limits sign-in to test users only
3. Implement Supabase Row Level Security (RLS) policies: Enable RLS on all tables and create policies that reference auth.uid() to ensure users can only access their own data
4. Store webClientId in environment variables: Never hardcode OAuth credentials in source code. Use react-native-config or dotenv
5. Test on real devices (not just emulators): Authentication behavior differs on physical devices vs emulators
6. Configure Supabase rate limiting for auth endpoints: Protect against brute force attacks
7. Set up error monitoring (Sentry/Crashlytics): Configure error tracking for authentication failures in production
8. Test sign-in flow after app store distribution: Download your app from TestFlight (iOS) or internal testing track (Android) to verify authentication works with app store signing keys
For comprehensive testing and deployment support, check out our case studies to see how we've helped companies ship production-ready applications. Organizations can also benefit from project management software to track authentication implementation tasks and task management systems for development workflows.
Ready to Build Secure Authentication?
Need Expert Help With React Native Authentication?
At AgileSoftLabs, we’ve delivered production-ready authentication for 50+ React Native apps across iOS and Android. From Google Sign-In with Supabase and Apple Sign-In to biometrics and enterprise SSO, we design secure, seamless auth systems that pass app-store reviews on the first submission.
What You'll Get:
• Production-ready authentication architecture tested on 1M+ monthly active users
• Cross-platform setup (iOS + Android) tested on real devices, not just emulators
• Supabase RLS policies and security hardening following OWASP mobile security guidelines
• Token refresh, session management, and comprehensive error handling for all edge cases
• App store compliance (Apple Sign-In requirement, OAuth consent screens, privacy policies)
Contact us for expert React Native authentication implementation or explore our product solutions for ready-made authentication systems.
The most important takeaways:
• Always use the Web Client ID in your React Native code (not Android or iOS Client IDs)
• Configure SHA-1 fingerprints for all build variants, including Google Play App Signing
• Add the iOS URL scheme to Info.plist
• Test the complete authentication flow on physical devices before releasing to production
These steps eliminate 95% of real-world auth failures. For enterprise-grade security, implement Supabase RLS, monitoring, and a production deployment checklist.
Ready to build your next React Native app with bulletproof authentication? Visit our blog for more technical guides or get in touch for a free consultation on your authentication architecture.
Frequently Asked Questions
1. How to set up Google Sign-In with Supabase + React Native Expo?
Configure Google Client ID/Secret in Supabase Auth > Providers. Use expo-auth-session with startAsync() flow and Supabase signInWithOAuth() for token exchange.
2. What env vars are needed for Supabase React Native auth?
SUPABASE_URL, SUPABASE_ANON_KEY, GOOGLE_CLIENT_ID, GOOGLE_WEB_CLIENT_ID. Handle token_hash verification with verifyOtp() on callback.
3. Why does Google Sign-In fail with DEVELOPER_ERROR in React Native?
Missing SHA1 fingerprint in Google Cloud Console or wrong webClientId. Use development build (expo run:android) vs Expo Go for native GoogleSignin.
4. Native vs web Google auth flow for React Native Supabase?
Native (react-native-google-signin): Better UX, SHA1 keys required. Web (expo-auth-session): Simpler setup, works in Expo Go/development builds.
5. How to configure Supabase Google OAuth provider correctly?
Enable Google provider in Supabase dashboard → add Client ID/Secret → set redirect URI https://your-project.supabase.co/auth/v1/callback. Use PKCE flow.
6. What's the complete React Native Supabase auth project setup?
npx create-expo-app → expo install expo-auth-session@~5.0.0 → Supabase-js v2 → Google Cloud Console setup → deep linking config → RLS policies.
7. How to handle Google auth callback in React Native?
Use useEffect with AuthSession.makeRedirectUri() → supabase.auth.signInWithOAuth({provider: 'google'}) → parse useEffect([session]) for token.
8. Supabase Google consent screen configuration steps?
Google Cloud Console → OAuth consent screen → add yourapp://auth scopes → publish → copy Client ID to Supabase → test with expo start --dev-client.
9. react-native-google-signin vs expo-auth-session for Supabase?
react-native-google-signin: Production native perf, requires custom dev client. expo-auth-session: Zero config for prototyping, web-based flow.
10. How to fix Supabase Google auth with Expo Router?
Add scheme in app.json → configure deep links → use router.push() for auth callback → handle AuthSession.getSessionAsync() in layout.
11. What Google Cloud Console setup is required for React Native?
Create OAuth 2.0 Client ID → Android (SHA1 + package name) → Web (redirect URIs) → publish app → download google-services.json for native builds



.png)
.png)
.png)



