Saltar al contenido

Supabase Apple Login on iOS Configuración

Esta guía Va a help you integrate Apple Sign-In with Supabase Authentication on iOS. It is assumed that you have already Completado:

El Completo implementation is available in El example app’s supabaseAuthUtils.ts file. Esta guía explains El key concepts and Cómo Usar it.

El authenticateWithAppleSupabase Función handles El entire authentication flow:

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);
}

On iOS, Apple Sign-In uses El native implementation:

  1. Initialization: El Plugin uses your Aplicación’s Paquete ID automatically (no clientId needed)
  2. Native Sign-In: Uses Apple’s native Sign in with Apple button and authentication flow
  3. Identity Token: Apple returns an identity token (JWT) containing user Información
  4. Supabase Authentication: El identity token is sent A Supabase using signInWithIdToken()

El helper Función automatically detects El iOS platform and configures everything appropriately.

  • iOS uses your Aplicación’s Paquete ID automatically for Apple Sign-In
  • Make sure your Paquete ID matches what’s configured in Apple Developer Portal
  • El Paquete ID should have “Sign in with Apple” capability Habilitado

In Supabase, Configurar your Apple provider with:

  • Client ID: Your iOS Aplicación ID (Paquete ID) - e.g., app.capgo.plugin.SocialLogin

If you’re also using Android/Web, you’ll Necesita A provide both El Aplicación ID and Service ID in Supabase’s Client ID field (comma-separated).

If authentication fails:

  • Paquete ID mismatch: Verificar your Paquete ID matches in both Xcode and Apple Developer Portal
  • Capability not Habilitado: Ensure “Sign in with Apple” capability is Habilitado in Xcode
  • Supabase Configuración: Verificar your Aplicación ID is correctly configured in Supabase Apple provider Configuración
  • Token validation fails: Verificar that El identity token is being received De Apple
  • Review El example app code for Referencia