Sign In with Apple Configuration

This guide walks you through configuring Sign In with Apple for your Median app. You'll register a Service ID in Apple Developer Portal, configure web authentication, and enable the capability in Xcode.

Overview

This guide walks you through configuring Sign In with Apple for your Median app. You'll register a Service ID in Apple Developer Portal, configure web authentication, and enable the capability in Xcode.


Before you start

Make sure you have:

  • An Apple Developer account (create one here)
  • Your app's iOS Bundle ID (example: co.median.ios.soclogin)
  • Your website domain (example: yourdomain.com)
  • Your return URLs for authentication callbacks
  • Admin or Account Holder role in Apple Developer account

Not sure where to find these? Check our App Identifiers Guide

ℹ️

Sign In with Apple is iOS Only
Sign In with Apple is only available for iOS apps. Android does not support this authentication method.


Step 1: Register a new Service ID

1.1 Access identifiers

  1. Log in to your Apple Developer Account.
  2. Click Certificates, Identifiers & Profiles.

1.2 Create new identifier

  1. In the left navigation, click Identifiers.
  2. Click the + button to create a new identifier.
  1. Select Services IDs.
  2. Click Continue.

Step 2: Configure Service ID

2.1 Add Service ID details

  1. Description: Add a user-friendly description of your app.
  2. Identifier: Enter your app identifier (this will be your Client ID).
    • Example: co.median.ios.soclogin.signin.
  3. Click Continue.
  4. Click Register.

Save your Identifier - This is your Client ID for Sign In with Apple (though no additional parameters are required in Median App Studio, as it uses your Bundle ID automatically).


Step 3: Configure web authentication

3.1 Select your Service ID

  1. In the Identifiers list, click the Service ID you just created.
2554

Click your identifier

  1. Check the box next to "Sign in with Apple".
  2. Click Configure.
2586

Check the box and click "Configure"

3.2 Add domains and return URLs

  1. Primary App ID: Select your app's primary identifier from the dropdown.
  2. Domains and Subdomains: Add your website domains.
  3. Return URLs: Add your authentication callback URLs/
2526

Select a primary ID and add Domains and Return URLs.

Important formatting rules:

  • Domains should not start with https://
  • Domains should not include a trailing /
  • Correct: subdomain.yoursite.com
  • Incorrect: https://subdomain.yoursite.com/

Example configuration:

  • Primary App ID: co.median.ios.soclogin
  • Domains and Subdomains: yourdomain.com
  • Return URLs: https://yourdomain.com/auth/apple/callback
  1. Click Done.
  2. Click Continue.
  3. Click Save.

Step 4: Enable Sign In with Apple in Xcode

4.1 Add capability

Within your Xcode project:

  1. Open your project in Xcode.
  2. Select your app target.
  3. Click the Signing & Capabilities tab.
  4. Click + Capability
  5. Search for and add Sign in with Apple
⚠️

Required for iOS
Failing to add the Sign in with Apple capability will result in Error Code 1000:
Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1000 "(null)"


Step 5: Add credentials to Median App Studio

Sign In with Apple requires minimal configuration in Median App Studio.

  1. Log in to Median App Studio.
  2. Navigate to: Native PluginsSocial LoginSettings.
  3. Enable Sign In with Apple.

Configuration:

  • No additional parameters required
  • Sign In with Apple uses your app's Bundle ID automatically
  • The Service ID you created is for web authentication only
  1. Click Confirm and Save.
  2. Rebuild your app for the changes to take effect.

Step 6: Testing

If email: null is received, then reset the Sign In with Apple session.

Apple only returns the complete user profile for the first initial login by a user. Subsequent logins to your app using Sign In with Apple from the same Apple ID will only return idToken and email will be null.

During testing, you may reset the login session for your test account to simulate an initial login and return the complete user profile. To do this log in to your Apple account at https://appleid.apple.com/account/manage and go to "Sign in and Security" > "Sign in With Apple". In the window that opens click your app and then select "Stop using Sign in With Apple".

When you now use the Sign In with Apple in your app again, it will create a new session, and return the complete user profile for you to process and save.