# Apple Sign-in configuration

Use this when you want to enable the **Apple** button in an enrolment form.

Start with [Social sign-in](https://docs.thewalletcrew.io/enroll/enrolment-form/social-sign-in) to understand the user flow. Then come back here for the provider setup.

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fx4WA8pRbL8ajheFw1l2a%2FApple-Social-Sign-In.png?alt=media&#x26;token=57a4dfa2-8cb1-4a14-a023-5b9ad5075484" alt="Apple-Social-Sign-In-Example" width="375"><figcaption><p>Connect with Apple in an enrolment form example</p></figcaption></figure>

### Overview

Use this page to configure **Sign in with Apple** (Apple ID login) for **The Wallet Crew** enrolment forms.

You will configure Apple in two places:

1. **Apple Developer**: App ID + Service ID + domains + return URLs.
2. **The Wallet Crew admin**: paste your Apple **Service ID**.

#### Terminology (Apple)

These terms are used in Apple Developer and OAuth setups.

* **App ID**: identifies your app. Uses a **Bundle ID** like `com.brand.app`.
* **Service ID**: identifies a web sign-in integration. This is what you paste in The Wallet Crew.
* **Domains and subdomains**: where the enrolment form is hosted.
* **Return URLs**: OAuth / OpenID Connect callback URLs used after Apple login.

#### Prerequisites

* Access to your brand’s **Apple Developer** account.
* Permission to manage **Identifiers** and **Service IDs**.
* The list of domains where your enrolment forms will run (prod + staging + dev + custom).

#### Apple behavior notes

Sign in with Apple has a few behaviors that impact your enrolment journey and your matching rules.

On the **first sign-in** with a given Apple account, Apple can provide **first name**, **last name**, and **email**. On **subsequent sign-ins**, Apple typically returns **email only**. Plan your forms as if you will only have the email long term.

{% hint style="warning" %}
Apple users can enable **Hide My Email**. In that case, Apple returns a relay address instead of the user’s real email.

That relay email can create duplicates if your CRM expects another identifier. If you email customers, you may also need to support delivery to Apple relay addresses.
{% endhint %}

Apple’s reference: [Communicating Using the Private Email Relay Service](https://developer.apple.com/documentation/signinwithapple/communicating-using-the-private-email-relay-service/).

### Configure Sign in with Apple

{% stepper %}
{% step %}

#### **Open Identifiers**

1. Log in to the Apple Developer account.

<p align="center"><a href="https://developer.apple.com/account" class="button secondary" data-icon="chevrons-right">Developer Account</a></p>

2. Go to `Certificates, IDs & Profiles` → `Identifiers`.
   {% endstep %}

{% step %}

#### **Create (or reuse) an App ID**

1. Click `+` and select `App IDs`.

![Click on +](https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fjqa4Ws0WcoKU2LvhaPcG%2Fimage.png?alt=media\&token=b6800653-7f45-480c-84fd-991d99e27a36) ![Select App ID](https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FUP4cHAkZd4jNn4rQEuRb%2Fimage.png?alt=media\&token=dcbf46a7-17b9-4b2b-980f-1b1b7d8a212c)

> If you already have an App ID for the same domain/app, you may be able to reuse it. This can unlock advanced scenarios. If you’re unsure, ask The Wallet Crew team.

2. Select the `App` type.
3. Fill the form with:
   1. **Description**: a meaningful name for your project
   2. **Bundle ID**: use the value provided by The Wallet Crew (example: `cloud.neostore.molia.app`)
   3. **Capabilities**: enable `Sign In with Apple`

<div><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FyQ5OZXNB7hOLj5fv5qZj%2Fimage.png?alt=media&#x26;token=c28de204-37ee-43c6-9a52-042b0e75f9a2" alt="Description and Bundle ID" width="520"><figcaption></figcaption></figure> <figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FMxBLvk7Tdxf6K32uBywg%2Fimage.png?alt=media&#x26;token=e0d84a6e-7e62-443f-8b87-7776c7850097" alt="Capabilities" width="563"><figcaption></figcaption></figure></div>

4. Validate the form and click `Register`.

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FBZ8GgWm146kMi3pn4jso%2Fimage.png?alt=media&#x26;token=5855c653-628d-4907-a04e-3e9cc46e1e12" alt="Create (or reuse) an App ID"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### **Create (or reuse) a Service ID**

You need a **Service ID** for Sign in with Apple on the web.

1. In the identifier list, switch the filter to `Service IDs`.
2. Click `+` and select `Service IDs`.

<div><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fjqa4Ws0WcoKU2LvhaPcG%2Fimage.png?alt=media&#x26;token=b6800653-7f45-480c-84fd-991d99e27a36" alt="Click on +" width="420"><figcaption><p>Click on +</p></figcaption></figure> <figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2F8yO8J70BwYJnT73UcOON%2Fimage.png?alt=media&#x26;token=19b341bc-3e5a-4c40-9b34-e30bd01074c0" alt="Service ID" width="563"><figcaption><p>Service ID</p></figcaption></figure></div>

3. Fill the form with:
   1. **Description**: a meaningful name for your service
   2. **Identifier**: use the value provided by The Wallet Crew (example: `cloud.neostore.molia.service`)

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FHgMOncTeVTw84MqHWmi1%2Fimage.png?alt=media&#x26;token=a1944458-d657-4a8b-99cf-9606f2839455" alt="Identifier"><figcaption></figcaption></figure>

4. Validate the form and click `Register`.

{% hint style="info" %}
The **Service ID identifier** is the value you will paste in The Wallet Crew admin.
{% endhint %}
{% endstep %}

{% step %}

#### **Configure Sign in with Apple (domains + return URLs)**

1. On the identifier list, select the Service ID you just created.
2. Enable `Sign in with Apple` and click `Configure`.

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FeWcJVIdI0natgcl1IwAW%2Fimage.png?alt=media&#x26;token=9a705af2-6a4d-49de-bedf-a08170285bdc" alt="Configure Sign in with Apple (domains + return URLs)"><figcaption></figcaption></figure>

3. Fill the form with:
   1. **Primary App ID**: the App ID you created earlier (example: `cloud.neostore.molia.app`)
   2. **Domains and subdomains**: add all domains that will host your enrolment forms (prod + staging + dev + custom)
   3. **Return URLs**: add the OAuth callback URL(s) for each environment

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FHFdLYWq2FOhwHtGbFFaH%2Fimage.png?alt=media&#x26;token=6d2b8d9b-e2cf-47d5-bfb2-b4c4d54306ae" alt="Return URLs"><figcaption></figcaption></figure>

4. Validate the form and click **Continue**.

{% hint style="warning" %}
Apple is strict here. Use the exact values.

If you are unsure about the callback URL format, ask The Wallet Crew team.
{% endhint %}
{% endstep %}

{% step %}

#### Configure Email Communication Domains

This step is required if your app sends emails to users who selected **Hide My Email** when signing in with Apple.

Apple generates a relay address like:

> <randomstring@privaterelay.appleid.com>

You must register your sending domain, or Apple will reject those emails. Treat relay addresses like normal email addresses in your backend.

{% hint style="info" %}
This step is required if you send email to users who chose **Hide My Email**.

Apple returns a **relay email address**. Treat it like a real mailbox.
{% endhint %}

**Open the Services section**

* In **Certificates, Identifiers & Profiles**, click **Services** in the left menu.
* Click **Sign in with Apple for Email Communication**.
* Click **Configure**.

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FmQcOK72SM3UN4ui0tpqo%2Fimage.png?alt=media&#x26;token=150fb5e5-29ff-46da-a37f-246607457136" alt="Configure"><figcaption></figcaption></figure>

* Under **Email Sources**, click the **+** button to add a new email source.

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FuFEpxcZaS4IJE31OgBJ6%2Fimage.png?alt=media&#x26;token=188da6f2-0045-4085-bdbb-96021d221405" alt="Email Sources"><figcaption></figcaption></figure>

**Fill the form with:**

* **Domains and Subdomains**:\
  Add the domain(s) you send email from.\
  Example:

  ```
  myapp.com
  mail.myapp.com
  ```
* **Email Addresses**:\
  Add the sender email address(es) used by your application.\
  Example:

```
noreply@myapp.com
support@myapp.com
```

<figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FB7Yg6gmtyao57jSr5wgD%2Fimage.png?alt=media&#x26;token=e4ec69a3-8fc4-4766-866b-e6be28d59443" alt="Fill the form with"><figcaption></figcaption></figure>

* Click **Next** and complete validation (SPF/DKIM verification if required).
  {% endstep %}
  {% endstepper %}

### Configure Apple in The Wallet Crew

1. On The Wallet Crew administration console, open:

<p align="center"><a href="https://admin.thewalletcrew.io/tenant/~/settings/social/apple" class="button secondary" data-icon="chevrons-right">Social Login → Apple</a></p>

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FAluF3SD1QvzgCY8QkdOh%2Fimage.png?alt=media&#x26;token=9c8ffdcc-7e0a-431c-98db-b3ac91b9937e" alt="The Wallet Crew - Apple Social Sign In configuration" width="563"><figcaption><p>The Wallet Crew - Apple Social Sign In configuration</p></figcaption></figure></div>

2. Fill the **Service ID** with the identifier used when creating the Service ID (example: `cloud.neostore.molia.service`).
3. Save.

{% hint style="info" %}
Paste the **Service ID** identifier.

Do not paste the App ID name or the Bundle ID.
{% endhint %}

### Enable Apple on your enrolment form

Enable the provider in the enrolment form settings.

Go into `advanced configuration -> Layout`. Open the layout to activate social sign-in on and add these lines:

```yaml
signinOptions:
  providers:
    - type: apple
      displayProps:
        isMobile: true
        isIOS: true
```

For more information see [Enrolment form](https://docs.thewalletcrew.io/enroll/enrolment-form).

### FAQ

<details>

<summary>Which domains do I need to add in Apple Developer?</summary>

Add every domain that can host the enrolment form.

Include prod, staging, dev, and any custom domain.

</details>

<details>

<summary>What should I put in “Return URLs”?</summary>

Add the callback URL for each environment and each form domain.

Keep it exact. Scheme, path, and trailing slash must match.

</details>

<details>

<summary>Why do I only get the user’s email after the first login?</summary>

Apple only returns name fields on the first consent.

On later logins, Apple typically returns email only.

</details>

<details>

<summary>What is “Hide My Email” and what does it change?</summary>

Apple may return a relay email instead of the user’s real email.

That can create duplicates if you match users by email only.

Apple’s reference: [Communicating Using the Private Email Relay Service](https://developer.apple.com/documentation/signinwithapple/communicating-using-the-private-email-relay-service/){target="\_blank"}.

</details>

<details>

<summary>Which value do I paste in The Wallet Crew admin: Bundle ID, App ID, or Service ID?</summary>

Paste the **Service ID**.

Example: `cloud.thewalletcrew.molia.service`.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thewalletcrew.io/enroll/enrolment-form/social-sign-in/apple-sign-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
