Who Are You? Login Discovery and Passwordless
Konten ini belum tersedia dalam bahasa Anda.
Module 2 of 5 in the chapter The Login Experience, chapter 15 of Securing Salesforce: Identity and Access. Each module stands on its own.
The question this module answers: How can a site ask “who are you?” first, and let her in without a password?
One question first
Section titled “One question first”The usual login page asks two questions at once: your username, and your password. That assumes everyone proves who they are the same way.
Chapter 14 showed they don’t. On one site, Amara has an email address and maybe a password; Tomás from a partner company should be signing in through his own company’s identity provider; someone else would rather never have a password at all. A page full of buttons asks each of them to work out which one is theirs.
A Login Discovery Page turns that around. It asks one thing first: an email address or a phone number. Then Salesforce, not the customer, works out what comes next (S2, S6).
Setting it up
Section titled “Setting it up”In the site’s Workspaces, Administration, Login & Registration, under Login Page Setup (S6):
- Login Page Type: Login Discovery Page.
- Login Prompt: the words on the page, for example “Email Address or Phone Number”. Use a custom label, such as
$Label.loginPrompt, so it can be translated (S6). On a site that serves customers in several languages, that matters. - Login Discovery Handler: leave it blank and click Create a Login Discovery Handler. Salesforce writes the Apex for you when you save, and you can change it later (S6).
- Execute Login As: the user the handler runs as, with the Manage Users permission. “By assigning a user to the handler, operations performed by the handler are easily traced back to the login process. In production, you typically create a system user for the Execute Login As user” (S6). The same advice as chapter 14’s Execute Registration As: never a real admin’s name.
- Employees: if “Allow employees to log in directly to the site” is selected, deselect it. The Login Discovery Page doesn’t support it (S6). Staff can use discovery too, on the org’s My Domain login page (S6).
That’s all the page needs. The work happens in the handler.
What the handler decides
Section titled “What the handler decides”The handler Salesforce generates does three things. In Salesforce’s words: “This handler accepts an email address or phone number from the login page and emails or texts a verification code to the user. If the user’s email or phone number isn’t verified, the user is prompted for a password” (S6).
Look at that last sentence. A code only goes to an address or a number she has already proved is hers. If she hasn’t, she needs her password. That’s the right default: sending a login code to an address nobody verified could hand her account to whoever really owns that address.
Then the part that makes discovery worth having: you can change the handler. “The Login Discovery Page doesn’t support org employees logging in to the site directly. However, you can customize the handler to redirect users to an IdP” (S6). So when Tomás types tomas@partner.example, your handler sees the partner’s domain and sends him to the partner’s identity provider, the single sign-on setting from chapter 14 module 3. He never sees a password box on your site. One field, and everyone ends up at their own door.
Chapter 14 said a handler is code you own. This one runs at every login, so test it like any code that decides who gets in: every kind of person, an address with capital letters, a person who isn’t there at all.
Passwordless
Section titled “Passwordless”The first two rows of the diagram are passwordless login. Salesforce’s description: “With passwordless login, users can log in, sign up, and even register identity verification methods without the trouble of remembering usernames or passwords” (S5).
There are two ways to use it (S5):
- Email or phone number registration. She registers with an email address or a phone number, Salesforce sends a code to check it, and from then on “each time they log in, Salesforce sends them a verification code that they can use instead of a password.” This is the Login Discovery Page, and chapter 14’s Configurable Self-Reg Page for the sign-up.
- Verification method registration. She registers other methods, “email, SMS, time-based one-time password (TOTP), physical U2F security key, and Salesforce Authenticator,” and logs in with one of them. This one needs a custom Visualforce page and Apex (S5).
What passwordless trades
Section titled “What passwordless trades”Passwordless isn’t “no security.” It moves the key.
There’s no password to guess, to reuse from another site, or to reset at the help desk. That removes a lot. But the code goes to her inbox or her phone, so whoever controls her inbox or her phone can log in as her. Her email account’s security has become part of yours, and you don’t control it.
So ask what the site protects. For a customer checking an order, a code to her verified email is often better than a password she reuses everywhere. For a site where she can change her bank details or spend money, a code alone may not be enough. That’s where the next question comes in.
MFA for customers
Section titled “MFA for customers”For staff, Salesforce requires MFA (chapter 2). For customers and partners, it doesn’t: “Salesforce doesn’t require multi-factor authentication (MFA) for external users but you can certainly include this class of users in your MFA implementation” (S7).
To turn it on for users who log in to a site directly with a username and password, add the Multi-Factor Authentication for User Interface Logins permission to their custom profiles. Standard profiles can’t be edited, and for external users this permission goes on the profile, not a permission set (S7). Chapter 14’s advice to clone the profile for outsiders pays off here.
Users who come in through their own identity provider or a social provider get their MFA there, if they get it at all (chapter 10). And you don’t have to choose all or nothing: ask for more only before the risky step, such as a payment, with a login flow or step-up (the Front Door chapter).
At Steve Trucking
Section titled “At Steve Trucking”One way to use this at Steve Trucking: recipients who choose to sign up for delivery updates register with an email or phone number and log in with a code. They visit a few times a year, and they’d never remember a password. Retail Partners’ people type their work email, and the handler sends them to their company’s identity provider. Small carriers keep a site login with MFA. One field on the login page, three different doors behind it.
Test knowledge. In my experience, know what a Login Discovery page does, what the handler decides, and that passwordless login sends a code to a verified email or phone. Know that MFA is optional for external users, and how to turn it on.
What’s next
Section titled “What’s next”Module 3: your own screens. When the company’s own app owns every screen, and Salesforce works behind it.
What an architect decides here
Section titled “What an architect decides here”- Discovery or a page of buttons, for each site.
- What the handler does for each kind of person, and how it’s tested.
- Passwordless or a password, and for which sites.
- MFA for customers: never, always, or before the risky step.
- A system user for Execute Login As.
Explore
Section titled “Explore”- Create a Custom Login Discovery Page (opens in a new tab) (Salesforce Help; checked 2026-11-21)
- Passwordless Login (opens in a new tab) (Salesforce Help; checked 2026-11-21)
- Enable MFA for External Experience Cloud Site Users (opens in a new tab) (Salesforce Help; checked 2026-11-21)
