Sign-In with Apple

NOTE: Sign-in with apple is only available on iOS device.

If Sign-in with apple is disable from the backend, all other social media login option with be disable on iOS(only). This is because Apple require you to have sign-in with apple as an option if you provide any other social login.

Prerequisites

Before you can start integrating (or even testing) Sign in with Apple you need a paid membership to the Apple Developer Program. Sign in with Apple is one of the restricted services which is not available for free with just an Apple ID (source).

Setup

Register an App ID

If you don't have one yet, create a new one at https://developer.apple.com/account/resources/identifiers/list/bundleId following these steps:

  • Click "Register an App ID"

  • In the wizard select "App IDs", click "Continue"

  • Set the Description and Bundle ID, and select the Sign In with Apple capability

    • Usually the default setting of "Enable as a primary App ID" should suffice here. If you ship multiple apps that should all share the same Apple ID credentials for your users, please consult the Apple documentation on how to best set these up.

  • Click "Continue", and then click "Register" to finish the creation of the App ID

In case you already have an existing App ID that you want to use with Sign in with Apple:

  • Open that App ID from the list

  • Check the "Sign in with Apple" capability

  • Click "Save"

If you have change your app's capabilities, you need to fetch the updated provisioning profiles (for example via Xcode) to use the new capabilities.

Xcode

At this point you should have added the Sign in with Apple capability to either your own app's capabilities.

In case you don't have Automatically manage Signing turned on in Xcode, you will need to recreate and download the updated Provisioning Profiles for your app, so they include the new Sign in with Apple capability. Then you can download the new certificates and select them in Xcode.

In case XCode manages your signing, this step will be done automatically for you. Just make sure the Sign in with Apple capability is activated as described above

Additionally this assumes that you have at least one iOS device registered in your developer account for local testing, so you can run the example on a device.

Firebase

You can now allow your user to login/signup via their Apple account.

You need to enable Apple sign-in on your firebase project. Login to your firebase console and select your project.

  1. Then select Authentication.

  2. On the authentication page select Sign-in methods.

  3. Then select Add New provider.

  4. After select Apple in the list of auth providers.

  5. Click the enable switch to enable it

  6. Then save

Last updated