Customise login page

Привет камунити!
В этой статье хочу поделиться с вами, как можно вместо стандартного флоу логина в организацию

сделать что-то прикольное, наподобие:

Реализовать мы это сможем благодаря тому, что SF предоставляет нам возможность создать “My Domain” для нашей организации. По дефолту, когда мы переходим на страницу логина, у нас в правой части отображается iframe (promos)
“My Domain” позволяет нам использовать кастомную страницу логина для нашей организации. Снизу план, как это можно быстро реализовать (͡° ͜ʖ ͡°)

Шаг 1 Создать Visualforce страницу

Так как наша страница не содержит кода(контроллера), вы можете создать или изменить вашу Visualforce страницу прямо на продакшене.

Для этого:

  1. Go to Setup > Develop > VisualForce Pages.
  2. Select New.
  3. Enter your code.
  4. Select Preview to make sure it works.
  5. Select Save.

Шаг 2 Создать сайт для нашей страницы

  1. Select Setup > Sites.
  2. If this is your first Site (or Community), you need to register your Sites/Communities domain name. Follow the instructions on the page.
  3. Once your domain is registered, select New. Fill in the first fields with your information.
  4. Add your Site Name (this will be the unique URL for the Site) and make the Site active.
  5. Select the Visualforce page created earlier as the Active Home Page.
  6. Leave the default entries as is.
  7. VERY IMPORTANT – Set the Clickjack Projection to “Allow framing by any page (No protection).” Otherwise, the page will not display.
  8. Accept the remaining default values.
  9. Save the Site.
  10. Verify that the page displays properly from the Site by clicking on the Site URL in the list of Sites.
  11. Write down the Site URL – you will need it in the next step.

Шаг 3 - Создание My Domain

You can skip this step if you already have My Domain setup.

If you do not have a My Domain specified for your organization, follow these steps:

  1. Select Setup > My Domain.

  2. Follow the on-screen instructions to register and then deploy your “My Domain.”

For more guidance watch this Salesforce video.

Шаг 4 - Конфигурация аутентификации

  1. In the lower half of the My Domain page called “Authentication Configuration”, select Edit.
  2. Enter the Site URL that you wrote down earlier in the Right Frame URL.

  1. Select Save.

Всё, теперь можно логиниться с помощью вашего кастомного решения :slight_smile:

4 Вподобання