---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://sourcecraft.dev/portal/docs/en/vibecraft/operations/connect-yandex-id.md
  - https://sourcecraft.dev/portal/docs/en/vibecraft/operations/connect-yandex-id.md
  - https://sourcecraft.dev/portal/docs/ru/vibecraft/operations/connect-yandex-id.md
  - href: https://sourcecraft.dev/portal/docs/en/vibecraft/operations/connect-yandex-id.md
    type: text/markdown
    title: Markdown version
  - href: https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r22227429
    rel: describedby
title: Enabling authentication via Yandex ID in VibeCraft
description: Set up user authentication via Yandex ID in your VibeCraft project.
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r22227429


# Enabling authentication via Yandex ID

In your VibeCraft project, you can implement user authentication via [Yandex ID](https://yandex.ru/dev/id/doc/en/), which is a single Yandex account. Your users will be able to log in to the application using their existing account without creating a separate username and password.

With the user’s permission, the application can access their account data, such as their name, email address, or avatar. This data can be used for the user dashboard and app personalization. VibeCraft will help configure the Yandex ID connector and add authentication to the project code.

To enable authentication via Yandex ID:

1. [Start the connector setup](#start-setup).
1. [Create an application in Yandex OAuth](#create-oauth-app).
1. [Complete the setup in VibeCraft](#connect).
1. [Test logging in to the application](#test-login).

## Start the connector setup {#start-setup}

1. Open the VibeCraft [home page](https://vibe.sourcecraft.dev) and select the project.
1. In the top-right corner, click ![image](../../_assets/console-icons/sliders.svg) **Settings**.
1. Open ![image](../../_assets/console-icons/plug-connection.svg) **Connectors** and click **Connect** in the **Yandex ID** card.

    {% note tip %}

    You can also start the setup directly from the chat. To do this, send the following query:

    ```text
    Connect the yandex-id connector and implement it in the application.
    ```

    {% endnote %}

1. The chat will prompt you to connect the connector. Wait for the **Connecting Yandex ID** window to open.
1. In the window that opens:
    * In **Name** field, specify the app name.
    * In the **Icon** section, click **Upload** and select an image on your computer or click **Generate** to create it with VibeCraft.

      The following formats are supported: JPG, PNG, GIF, WebP, SVG, and ICO. The maximum file size is 1 MB, and the recommended image size is 256 × 256 pixels.

1. Click **Continue**.

## Create an application in Yandex OAuth {#create-oauth-app}

1. Sign in to [Yandex OAuth](https://oauth.yandex.ru/) using the Yandex account you are planning to use for further development.
1. Open the [application registration form](https://oauth.yandex.ru/client/new/id/).
1. Enter a name for your app, upload an icon, and provide a contact email address. Click **Continue**.
1. In the **Application platforms** step, select **Web services**.
1. Go back to the VibeCraft tab and click **Continue**.

    VibeCraft will show the URLs to specify in Yandex OAuth:

    * **Redirect URLs**: URLs to return to the application after authentication.
    * **Suggested Hostnames**: URLs of pages with the sign-in button.

    The lists may include the URLs of the preview version, [published project](https://sourcecraft.dev/portal/docs/en/vibecraft/operations/deploy.md), and [custom domain](https://sourcecraft.dev/portal/docs/en/vibecraft/operations/attach-domain.md). Use the values shown for your project.

1. Copy all URLs from the **Redirect URLs** section and paste them into the **Redirect URI** fields in Yandex OAuth. For each subsequent URL, add a field by clicking ![image](../../_assets/console-icons/plus.svg).
1. In the same way, copy all URLs from the **Suggested Hostnames** section and paste them into the **Suggest Hostname** fields in Yandex OAuth.
1. Click **Continue** in Yandex OAuth.
1. In the **User data access permissions** step, select the data for your app. For example, enable **Access to email address** to get the email. Click **Continue**.
1. Preview the sign-in window for users and click **Everything is correct, create app**.

    This will open the page of your new application with the **ClientID** and **Client secret** properties.

Learn more about app registration in [this Yandex ID guide](https://yandex.ru/dev/id/doc/ru/register-auth).

## Complete the setup in VibeCraft {#connect}

1. Go back to the VibeCraft tab and click **Continue**.
1. Copy the data from the application’s Yandex OAuth page:
    * **ClientID**
    * **Client secret**

1. Click **Connect** and wait for the setup to complete.
1. Click **Open connector settings**. Under ![image](../../_assets/console-icons/plug-connection.svg) **Connectors**, your **Yandex ID** connector should now have the **Connected** status. Wait for the application environment update to complete.
1. Close the settings and wait for a message from VibeCraft in the chat confirming that the process is complete: once the connector is connected, the service will add authentication to the application code.

To check the connection later, click ![image](../../_assets/console-icons/sliders.svg) **Settings** in the top right corner and open the ![image](../../_assets/console-icons/plug-connection.svg) **Connectors** section.

## Test logging in to the application {#test-login}

1. Open the ![image](../../_assets/console-icons/eye.svg) **Preview** tab and refresh the preview version if needed by clicking ![image](../../_assets/console-icons/arrow-rotate-right.svg).
1. Open the app in a new browser tab using ![image](../../_assets/console-icons/arrow-up-right-from-square.svg).
1. Click the Yandex ID login button you added to the application.
1. Select the Yandex account and grant access to the data you specified when registering the application.
1. After authentication, make sure you are redirected back to the application and logged in with your account.

If you have trouble logging in, check the **Redirect URI** and **Suggest Hostname** addresses in Yandex OAuth and describe the issue in the VibeCraft chat.

After the test, [publish the updated project version](https://sourcecraft.dev/portal/docs/en/vibecraft/operations/deploy.md).

#### Useful links {#see-also}

* [Yandex ID guides](https://yandex.ru/dev/id/doc/ru/)
* [Getting started with VibeCraft](https://sourcecraft.dev/portal/docs/en/vibecraft/index.md)
* [Publishing a VibeCraft project in Yandex Cloud](https://sourcecraft.dev/portal/docs/en/vibecraft/operations/deploy.md)
* [Attaching a custom domain to a VibeCraft project](https://sourcecraft.dev/portal/docs/en/vibecraft/operations/attach-domain.md)
