Supabase Apple Login - General Setup
Overview
Section titled “Overview”This guide will help you integrate Apple Sign-In with Supabase Authentication. Apple Sign-In provides a secure, privacy-focused authentication method that works across iOS, Android, and Web platforms.
Prerequisites
Section titled “Prerequisites”Before starting, ensure you have:
-
Read the Apple Login General Setup guide to setup Apple OAuth credentials
-
Followed the respective platform-specific guides to setup Apple OAuth credentials for your target platform:
Enabling Apple OAuth provider in Supabase
Section titled “Enabling Apple OAuth provider in Supabase”-
Go to your Supabase Dashboard
-
Click on your project

-
Do go to the
Authenticationmenu
-
Click on the
Providerstab
-
Find the
Appleprovider
-
Enable the
Appleprovider
-
Fill in the client ID configuration:

-
Click on the
Savebutton
Voilà, you have now enabled Apple Sign-In with Supabase Authentication 🎉
Using the Authentication Helper
Section titled “Using the Authentication Helper”The complete implementation includes a helper function authenticateWithAppleSupabase() that handles the entire Apple Sign-In flow with Supabase. This function:
- Initializes Apple Sign-In with platform-specific configuration
- Handles the authentication flow (native on iOS, OAuth redirect on Android/Web)
- Extracts the identity token from Apple
- Signs in to Supabase with the identity token
Basic Usage
Section titled “Basic Usage”import { authenticateWithAppleSupabase } from './supabaseAuthUtils';
const result = await authenticateWithAppleSupabase();if (result.success) { console.log('Signed in:', result.user); // Navigate to your authenticated area} else { console.error('Error:', result.error);}How It Works
Section titled “How It Works”The helper function automatically handles platform-specific differences:
- iOS: Uses native Apple Sign-In (no redirect URL needed, uses bundle ID automatically)
- Android: Uses OAuth redirect flow with backend edge function (requires Service ID)
- Web: Uses OAuth popup flow (requires Service ID and current page URL as redirect)
The function returns an identity token from Apple, which is then used to authenticate with Supabase using supabase.auth.signInWithIdToken().