> 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-google.md).

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

Для подключения входа через Google необходимо создать OAuth-приложение в Google Cloud Console.

### Шаг 1. Создайте проект

Откройте:

```
https://console.cloud.google.com/
```

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

***

### Шаг 2. Настройте OAuth Consent Screen

Перейдите: `APIs & Services → OAuth Consent Screen`

Заполните:

* название приложения;
* email поддержки;
* домен сайта;
* контактный email.

Для большинства проектов используется тип:

External

***

### Шаг 3. Создайте OAuth Client

Перейдите: `APIs & Services → Credentials`

Нажмите: `Create Credentials → OAuth Client ID`

Тип приложения: `Web Application`

***

### Шаг 4. Укажите Return URL

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

#### Authorized JavaScript Origins

```
https://ваш-домен
```

#### Authorized Redirect URIs

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

***

### Шаг 5. Получите ключи

Google выдаст:

* Client ID
* Client Secret

Скопируйте оба значения.

***

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

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

Заполните:

* Client ID
* Client Secret

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

***

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

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

Если ошибок нет:

1. Откройте страницу входа на сайте.
2. Нажмите «Войти через Google».
3. Выполните тестовую авторизацию.

***

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

<details>

<summary>redirect_uri_mismatch</summary>

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

Решение: **Скопируйте адрес из админки заново и полностью замените его в настройках Google.**

</details>


---

# 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-google.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.
