> For the complete documentation index, see [llms.txt](https://docs.iexexchanger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iexexchanger.com/guide/polzovateli/vkhod-cherez-servisy/nastroika-vkhoda-cherez-apple.md).

# Настройка входа через Apple

Для подключения Apple ID потребуется активный аккаунт Apple Developer.

### Шаг 1. Откройте Apple Developer

Перейдите:

```
https://developer.apple.com/account/
```

Откройте раздел: **Certificates, Identifiers & Profiles**

***

### Шаг 2. Создайте App ID

Создайте новый App ID или используйте существующий.

Обязательно включите возможность: **Sign in with Apple**

***

### Шаг 3. Создайте Services ID

Откройте: `Identifiers → Services IDs`

Создайте новый Services ID.

Пример идентификатора:

```
com.example.exchange.service
```

После создания включите: **Sign in with Apple**

***

### Шаг 4. Укажите домен и Return URL

В настройках Services ID заполните:

#### Domain

```
example.com
```

#### Return URL

Скопируйте Return URL из админки и вставьте его без изменений.

***

### Шаг 5. Создайте ключ

Перейдите: **Keys**

Создайте новый ключ и включите: **Sign in with Apple**

После создания сохраните:

* Team ID
* Key ID
* Private Key (.p8)

Важно: файл `.p8` обычно можно скачать только один раз.

***

### Шаг 6. Заполните настройки в админке

Откройте: **«Пользователи» — «Вход через сервисы» — «Apple»**

Заполните:

* Client ID
* Team ID
* Key ID
* Private Key (.p8)

Включите сервис и сохраните изменения.

***

### Шаг 7. Выполните проверку

Нажмите: **Проверить**

После успешной проверки выполните тестовый вход через Apple ID на клиентской части сайта.

***

### Частая ошибка

<details>

<summary>Invalid Redirect URL</summary>

Причина: **Return URL в Apple отличается от Return URL из админки.**

Решение: **Проверьте домен и полностью замените URL на тот, который отображается в системе.**

</details>

***

### Рекомендации

* Используйте только HTTPS.
* Храните файл `.p8` в безопасном месте.
* Не публикуйте Team ID, Key ID и Private Key.
* После смены домена обязательно обновите настройки Apple Developer.
* Перед запуском выполните тестовую авторизацию на реальном сайте.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.iexexchanger.com/guide/polzovateli/vkhod-cherez-servisy/nastroika-vkhoda-cherez-apple.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
