# Авторизация Google

1. Перейдите в Google Console -> APIs & Services -> [Credentials](https://console.cloud.google.com/projectselector2/apis/credentials?supportedpurview=project).
2. Войдите в ваш Google Account.
3. Нажмите "[**Create project**](#user-content-fn-1)[^1]" -> [**заполните**](#user-content-fn-2)[^2] необходимые поля -> нажмите "**Create**".
4. На странцие "**Credentials**" нажмите "[**Configure consent screen**](#user-content-fn-3)[^3]" -> для "**User type**" выберите "**External**" -> нажмите "[**Create**](#user-content-fn-4)[^4]".
5. На шаге "**OAuth consent screen**" [**заполните** ](#user-content-fn-5)[^5]обязательные поля "**App name**" и выберите "**User support email**" -> ниже в разделе "**Authorized domains**" нажмите "**Add domain**" и введите домен вашего сайта -> в поле "**Developer contact information**" введите email -> нажмите "[**Save and continue**](#user-content-fn-6)[^6]".
6. На шаге "**Scopes**" нажмите "**Add or remove scopes**" -> выберите пункты как показано на [**скриншоте**](#user-content-fn-7)[^7] (по усмотрению можете добавить и другие Области действия OAuth 2.0 для API Google. Подробнее в [инструкции](https://developers.google.com/identity/protocols/oauth2/scopes?hl=ru).) -> нажмите "**Save and Continue**".
7. На шаге "**Test users**" вы можете не вносить изменений. Либо вы можете  добавить пользователей для тестирования, если это необходимо. Изначально будет выставлен статус "**Testing**" -> поменяйте статус на "[**In production**](#user-content-fn-8)[^8]" (подробнее по [ссылке](https://support.google.com/cloud/answer/10311615#publishing-status)) -> нажмите "**Save and continue**".&#x20;
8. На шаге "**Summary**" вам будет доступна сводка на основании заполненных данных.&#x20;
9. Возвратитесь на вкладку "**Credentials**" -> нажмите "**Create credentials**" -> выберите "[**OAUTH Client ID**](#user-content-fn-9)[^9]".
10. На открывшейся странице для "**Application type**" выберите "**Web application**" -> введите название -> нажмите "**Add URI**" -> добавьте ссылку по примеру ниже -> нажмите "[**Create**](#user-content-fn-10)[^10]"

```
https://www.yourdomain.net/service/auth/google/callback
```

11. Скопируйте **Client ID** и **Client secret** из **Google Console** -> перейдите в админ панель BoxExchanger -> страница "**Система авторизации**" -> в методе авторизации "**google**" вставьте **Client ID** и **Client secret** в соответствующие поля -> [**передвиньте ползунок**](#user-content-fn-11)[^11] в активное положение.&#x20;
12. В админ панели перейдите на страницу "**Настройки сайта**" -> раздел "**Server**" -> нажмите "[**Reboot**](#user-content-fn-12)[^12]" напротив двух процессов "**api-http**".&#x20;
13. В итоге в [**окне входа**](#user-content-fn-13)[^13] и [**регистрации**](#user-content-fn-14)[^14] для клиента будет доступен метод авторизации через **google**.&#x20;

[^1]: ![](/files/C63HX0knK7zOK1w37BLm)

[^2]: ![](/files/lUuYUPJq7bw83IhM1i7H)

[^3]: ![](/files/kc3blkiKkVYjY3GxBCtR)

[^4]: ![](/files/eWn9nth9HVME1VLhexoF)

[^5]: ![](/files/KRmtfhIdGqzz0BvE9AwS)

[^6]: ![](/files/1E3xkQCqmwK8eFzopBri)

[^7]: ![](/files/WH4MoM5ptNdfiARL4YEf)

[^8]: ![](/files/bS1xNx75RmkCDIxb1nk1)

[^9]: ![](/files/Lr0VjJcR5qWVsoie2VfT)

[^10]: ![](/files/13yk9DCKDZ1Ff4KmdAVt)

[^11]: ![](/files/eJn0iIEyBB6yR06NYUca)

[^12]: ![](/files/jaZDYfmvz8jShiFDQpZd)

[^13]: ![](/files/tJc36kUOjQiZR8lOU9mQ)

[^14]: ![](/files/Dr5hNtoL6onTKLUbpfQP)


---

# 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://manual.boxexchanger.net/sistemy-avtorizacii/avtorizaciya-google.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.
