Example of enabling authorization in WordPress

For more information about the requirements for comments and authorization resources, see the Adding authorization and Adding commenting sections.

The steps for adding login functionality are described below.

  1. Step 1. Create a file with the HTML headers for the login form
  2. Step 2. Create a resource that checks authorization
  3. Step 3. Create a resource that performs logout
  4. Step 4. Connect and check authorization

Step 2. Create a resource that checks authorization

  1. Create the /api/turbo/auth.php file in your site repository.
  2. Copy the api/turbo/auth.php file content to the auth.php file you created.

Learn more about the functions.php file in tutorial video (9:40).

Step 3. Create a resource that performs logout

  1. Create the /api/turbo/logout.php file in your site repository.
  2. Copy the api/turbo/logout.php file content to the logout.php file you created.

Learn more about the logout.php file in tutorial video (11:18).

Step 4. Connect and check authorization

  1. In Yandex.Webmaster, open the Turbo pages → Settings → Authorization page.
  2. Specify links to resources:
    • URL of the page with the login form, for example, https://my-domain.ru/wp-logn.php;
    • The URL to verify the authorization, such as https://my-domain.ru/api/auth.
    • The URL for logging out, such as https://my-domain.ru/api/logout.
  3. Save your changes.
  4. See how authentication works on the sample Turbo page.