詳細情報:
カスタムのワンタイムパスワード配信 Apex ハンドラーの作成
カスタムのワンタイムパスワード(OTP) 配信は、Auth.CustomOneTimePasswordDeliveryHandler インターフェイスを実装する Apex ハンドラーに依存します。カスタム OTP 配信ハンドラーは、SMS を介してユーザーに OTP を送信するようにプロバイダーにコールアウトします。SMS メッセージの内容とユーザーに表示されるショートコードをカスタマイズできます。
カスタムのワンタイムパスワード(OTP) 配信は、Auth.CustomOneTimePasswordDeliveryHandler インターフェイスを実装する Apex ハンドラーに依存します。カスタム OTP 配信ハンドラーは、SMS を介してユーザーに OTP を送信するようにプロバイダーにコールアウトします。SMS メッセージの内容とユーザーに表示されるショートコードをカスタマイズできます。
| 使用可能なインターフェース: Salesforce Classic (一部の組織で使用可能) および Lightning Experience の両方 |
| 使用可能なエディション: Professional Edition、Enterprise Edition、Unlimited Edition、Developer Edition |
| 必要なユーザー権限 | |
|---|---|
| Apex クラスの定義、編集、削除、セキュリティの設定、およびバージョンの設定を行う | 「Apex 開発」 |
| Apex テストを実行する | 「設定・定義の参照」 |
カスタム OTP 配信ハンドラーは、sendOneTimePassword メソッドを使用して OTP をユーザーに送信します。
] をクリックし、[開発者コンソール] を選択します。
MyCustomOtpHandler)。
Auth.CustomOneTimePasswordDeliveryHandler インタフェースを実装し、Auth.CustomOneTimePasswordDeliveryResult 列挙のインスタンスを返す Apex ハンドラーを開発します。
userId、phoneNumber、oneTimePassword、defaultText、networkId、および experienceId のハードコードされた値を使用して Apex ハンドラーをテストします。「Testing Apex」を参照してください。
次に、Experience Cloud サイト設定にハンドラーを追加します。

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.