Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Experience Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Customize Code for Lightning Components on Login Pages

          Customize Code for Lightning Components on Login Pages

          To add custom logic to the Login pages in Experience Builder sites, customize the Lightning component for those pages.

          Required Editions

          Available in: both Salesforce Classic and Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions
          User Permissions Needed
          To create and edit Lightning components: Customize Application

          Each site has these default Login pages: Check Password, Forgot Password, Login, Login Error, and Register. And each Login page has a standard Lightning component that drives this functionality. If your company or site has any usability, security, or accessibility requirements that aren't supported by preconfigured login components, you can customize the login experience by creating custom components and adding code logic.

          1. From Setup, in the Quick Find box, enter Lightning Components, and then select Lightning Components.
          2. To customize a component, click the one that you want. For example, to customize the login experience, click loginForm.
            List of Lightning components
          3. On the Lightning component detail page, click Developer Console.
          4. In the Developer Console workspace, add implements="forceCommunity:availableForAllPageTypes" to the <aura:component> tag. Implementing the forceCommunity:availableForAllPageTypes interface exposes the component in Experience Builder.
          5. Add custom code logic and save your changes as a new custom component.
          6. Go back to Experience Builder in your site and bring up the Login page from the list of pages. The custom component you created appears on the list of components.
            Custom Lightning component in Experience Builder
           
          Loading
          Salesforce Help | Article