WordPress
With the Yandex ID plugin for WordPress, users can log in to your website via their Yandex accounts.
To set up Yandex ID on your website:
-
Upload the plugin to WordPress:
-
Log in to WordPress as an administrator.
-
Go to Плагины (Plugins). At the top of the page, click Загрузить плагин (Upload plugin).
-
Select the archive with the Yandex ID plugin and click Установить (Install).
-
Wait for the plugin to be installed and then activate it.
-
-
Configure the uploaded plugin:
-
Go to Yandex ID.
-
Edit the Настройки Яндекс ID (Yandex ID settings):
- App name is the name that the user will see when logging in via Yandex ID.
- Authorization component determines which element will be used for granting access: a login button or an instant login widget.
- Group assigned when creating a user determines which user group a new user is assigned to.
-
Set the Запрашиваемые данные пользователя (Requested user data). During the authorization process, the Yandex ID component will ask the user to grant access to the data you specify in this section. If the user consents, their information will be saved on your website. You can request the following data: the username, first name, last name, gender, date of birth, phone number, email address, and avatar. For some data, such as the phone number, you can select which user-related field it should be saved in.
-
If you select a login button as your authorization component, edit the Настройки внешнего вида для кнопки авторизации (Login button appearance settings):
- Button type — Select a button type matching your website's design from the list. You'll see what the button looks like in the settings section.
- Value of the button container's id attribute — Enter the ID of the container where the login button will be placed. The default value is
yandex-id-container
. - Button border radius — The button's border radius in pixels for rounded corners. When the value is 0, the button is rectangular.
- Button theme — Should match the theme of the webpage where the button is placed so that it doesn't blend into the background.
- Button size — Determines the default height, minimum width, and switching to the minimized appearance.
- Icon type — Determines the language of the logo on the button.
- Background color — Icon button's background color. Only applicable to the icon button with an outline.
- Hover background color — Icon button's background color on hover. Only applicable to the icon button with an outline.
- Outline color — Icon button's outline color. Only applicable to the icon button with an outline.
- Hover outline color — Icon button's outline color on hover. Only applicable to the icon button with an outline.
- Outline width — Icon button's outline width. Only applicable to the icon button with an outline.
Note
The color parameters accept HEX color values. For example, black is #000000. To find the HEX code of a specific color, you can use a color table like https://colorscheme.ru/html-colors.html.
-
-
Place the Yandex ID authorization component on your website. Use the
[yandexid]
shortcode to do this.