User Verification for iOS

Pass user verification information to Salesforce to ensure that your customers get the best experience with an agent.

This feature requires version 1.2.0 or later of the Messaging for In-App SDK.

This article applies to the following implementations:

UI SDKCore SDK

Before you can use the SDK for user verification, you must upload the appropriate keys to Salesforce. To learn about and set up User Verification, see User Verification in Salesforce Help.

Currently, this feature supports JWT tokens. Also, we don’t support chatting with verified users alongside unverified users. Your implementation must be designed for either verified users or unverified users.

  1. When creating the UIConfiguration or Configuration object, add the optional userVerificationRequired argument and set it to true. See the CoreConfiguration reference documentation.
  2. Implement the UserVerificationDelegate interface. This delegate contains the userVerificationChallengeWithReason method, which the SDK calls when it requires user verification information.
  3. Add your delegate to the SDK using the CoreClient.userVerificationDelegate property. See the CoreClient reference documentation.
  4. Revoke the token when the user logs out by calling CoreClient.revokeTokenAndDeregisterDevice. See the CoreClient reference documentation.

This sample code requires the configuration object that you created when setting up the UI SDK or the Core SDK. See Build a UI SDK App or Build a Core SDK App for more information.

After you register your delegate, the SDK automatically calls the userVerificationChallegeWithReason method when it needs a valid token.