---
schema_version: "1"
id: 8f30ffd87ea56d89261dba682f594fd5e9fa9017af409d8ced7a3e88ef5d3274
title: Create an Interview-Based Login Page with My Domain Login Discovery
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/domain_name_login_discovery.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.domain_name_login_discovery.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 81337713a5aec94f5783a5ce0bfb278172dde0d788a484948286c683fba77e4c
description: Configure My Domain with Login Discovery to simplify the login process for users. Login Discovery is sometimes called interview-based login because it’s a two-step process. First, users identify themselves with an email address or phone number at the login page. Next, users verify themselves depending on the identifier entered. Users can verify themselves with a password, their single sign-on (SSO) credentials, or Lightning Login. You set up Login Discovery from the My Domain Setup page after you create an Apex class that implements the MyDomainLoginDiscoveryHandler interface.
products:
  - Salesforce Platform
  - Cross Cloud
release: "264"
---
# Create an Interview-Based Login Page with My Domain Login Discovery

Configure My Domain with Login Discovery to simplify the login process for users. Login Discovery is sometimes called interview-based login because it’s a two-step process. First, users identify themselves with an email address or phone number at the login page. Next, users verify themselves depending on the identifier entered. Users can verify themselves with a password, their single sign-on (SSO) credentials, or Lightning Login. You set up Login Discovery from the My Domain Setup page after you create an Apex class that implements the `MyDomainLoginDiscoveryHandler` interface.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Group</strong>, <strong>Essentials</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and<strong> Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d97613e85">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d97613e85 ">To customize a My Domain login page:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d97613e85 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

Login Discovery eliminates the onerous task of managing forgotten usernames. With Login Discovery, your users can log in with something they’re likely to remember, like their email address or phone number. Also, if your org is configured with multiple identity providers (IdP) for SSO, Login Discovery can direct users to the suitable IdP. If your login page contains an SSO button along with the username and password fields, users can miss the button or not know what it’s used for. If you’re using Login Discovery, no decisions are required.

Login Discovery is helpful when you have different login processes depending on the situation, such location or device type. For example, if you have separate IdPs for mobile and desktop users. Instead of having a login page with buttons for both, Login Discovery determines where users are logging in from and directs them to the suitable IdP.

To configure Login Discovery for My Domain, create a handler in Apex and then reference the handler from the My Domain Setup page. The Apex class implements the `MyDomainLoginDiscoveryHandler` interface. The handler includes logic that defines how to look up a user based on the identifier value entered on the login page. Then it determines which authentication service to invoke.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-setup-264-0-0-production-enus/6f21df35-9ea0-4f53-ac94-45c3b5dfd5bc/images/icon_note.png)

Note Authentication configuration settings apply to your org’s deployed and provisioned My Domains.

1. From Setup, in the Quick Find box, enter My Domain, and then select **My Domain**.
2. Under Authentication Configuration, click **Edit**.
3. For Login Page Type, select **Discovery**.
4. Optionally, for Login Prompt, enter the text or custom label.
    
    For example, you can use a custom label to localize the text, such as `$Login.loginPrompt`.
5. Locate the Login Discovery Handler that you created by implementing the `MyDomainLoginDiscoveryHandler` interface. From Setup, in the Quick Find box, enter Apex Classes, and then select **Apex Classes**. Select the handler from the list.
6. Optionally, for Execute Login As, choose a Salesforce admin with Manage Users permission.
    
    By default, the handler runs in system mode.
7. Save your changes.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-setup-264-0-0-production-enus/6f21df35-9ea0-4f53-ac94-45c3b5dfd5bc/images/icon_tip.png)

Tip If you can’t log in after setting up Login Discovery, modify the URL to return to the standard login page, which prompts for a username and password. You can add login as a URL query string parameter, for example, https://MyDomainName.my.salesforce.com/?login. Or you can add login=true to the URL, for example, https://MyDomainName.my.salesforce.com/?login=true.

#### See Also

- [Configure My Domain Settings](https://help.salesforce.com/s/articleView?id=xcloud.domain_name_settings.htm&release=264.0.0&type=5 "Customize your login page with your brand and determine the user experience when they log into your Salesforce org via your My Domain.")
- [Verify Email Addresses with Async Email](https://help.salesforce.com/s/articleView?id=xcloud.emailadmin_async_email_verification.htm&type=5&language=en_US)