Sign In with Apple Tutorial

back4app
4 min readOct 10, 2019

--

Thanks to drawkit.io for the nice illustration

Introduction

Sign In with Apple enables users to sign in to Apps using their Apple ID. This feature is available on iOS 13 and later, and Parse 3.5 and later.

Prerequisites

To begin with this tutorial, you will need:

Step 1 — Create a New Back4App App

First of all, it’s necessary to make sure that you have an existing app created at Back4App. However, if you are a new user, you can check this tutorial to learn how to create one.

Step 2 — Create a new Identifier

Log into your Apple Developer account and go to Certificates, IDs & Profiles

Go to Identifiers and click the + button to add a new App ID

Choose App IDs

Mark Sign In with Apple and click the Edit button on the right

Make sure Enable as a primary App ID is selected

Fill up the Description and use a reverse domain to set the Bundle ID. Click Continue when done.

Check if all the information is right and click Register`

Step 3 — Create a new Service ID

Back to the Identifiers section, click the + button again

This time check Services IDs`

Fill up the Description and the Identifier. The Identifier must be different than the one set in Identifiers, so just add the suffix "id" at the end of it.

Mark Sign In with Apple and click Edit

Choose the correct Primary App ID for your Application and set the Web Domainand the Return URLs. The Web Domain will be the subdomain used in Back4app, which you set in Server Settings > Web Hosting and Live Queries. You can learn how to set up a subdomain in this tutorial. The Return URLs will be the URLs to be redirected after a successful login.

Download the apple-developer-domain-association.txt file.

Step 4 — Verifying your Domain

Create a new file called app.js and paste the following content in it:

Upload it to your Cloud folder in the Cloud Code Functions section. In your Public folder, create a subfolder named well-known and upload the apple-developer-domain-association.txt in it.

You can now verify your domain in the Apple website. After the verification, save everything.

Step 5 — Create a new Key

Go to the Keys section and click the + button to add a new Key

Fill up the Key Name, check Sign In with Apple and click Configure`

Make sure the Primary App ID is correct and save

At the end download your new Key by clicking the Download button.

ATTENTION: Save this key in a safe place as you will not be able to download it again.

Step 6 — Set up Parse Auth for Apple

We are working on a way for you to set up this by yourself on the near future. At this time, contact our chat and tell them you want to configure this. Our team will set it up for you. Have your Bundle ID in hand. The team will need that information to set this up.

Step 7 — Start the development

Now that the Sign In with Apple is configured, you can start the development process.

The Sign In with Apple for iOS is available.

Originally published at https://www.back4app.com.

--

--

back4app
back4app

Written by back4app

Store and query relational data on the cloud. Make it accessible over GraphQL and REST with a scalable, open-source backend, based on the Parse Platform.

No responses yet