MyDomainDiscoverableLogin

Represents the configuration settings when the My Domain login page type is Discovery. Login Discovery provides an identity-first login experience, where the login page contains the identifier field only. Based on the identifier entered, a handler determines how to authenticate the user.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

MyDomainDiscoverableLogin components have the suffix .myDomainDiscoverableLogin in the myDomainDiscoverableLogins folder.

Version 

Introduced in API version 48.0.

Fields 

apexHandler 

  • Type: string
  • Required: Yes
  • Description: Required. The Apex handler class that contains the Discovery authentication logic.

executeApexHandlerAs 

  • Type: string
  • Required: No
  • Description: The user who is executing the handler. Requires the Manage User permission.

usernameLabel 

  • Type: string
  • Required: No
  • Description: The login prompt when the My Domain login page type is Discovery. This label supports localization with custom labels.

Declarative Metadata Sample Definition 

The following is an example of a MyDomainDiscoverableLogin component.

1<?xml version="1.0" encoding="UTF-8"?>
2<MyDomainDiscoverableLogin xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apexHandler>MyDomainDiscLoginHandler</apexHandler>
4    <executeApexHandlerAs>executeUser@example.com</executeApexHandlerAs>
5    <usernameLabel>Enter your email</usernameLabel>
6</MyDomainDiscoverableLogin>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>MyDomainDiscoverableLogin</name>
6    </types>
7    <version>48.0</version>
8</Package>

Usage 

Use this type to access the My Domain Login Discovery Page. This type of login page prompts users to identity themselves with an email address, phone number, or custom identifier. My Domain Login Discovery performs an interview-based login process, where users are prompted to provide identity for authentication. For example, users receive a verification code that they enter to complete the login process.

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.