Learn how to integrate the client-side iOS SDK into your native new application
Start()
function on the server. In a mobile flow, Mobile Auth executes first and if that fails, performs one-time password (OTP) validation on the mobile phone.
In the mobile flow, once either Mobile Auth or the OTP validation is complete, the AuthFinishStep
function executes.
Authenticate()
authToken
as a parameter for the Authenticate()
function. This token returns from the Start()
call of the server-side SDK. The token is session specific so it’s used for a single flow. It also expires after 15 minutes.
authToken
YYYY-MM-DD
, or the last four digits of the social security number.
authToken
, build the authenticator for the mobile flow.
AuthFinishStep
, you’ll specify a function to call once the possession checks complete on the mobile phone. In the following code, you’ll notice an endpoint called /verify
. This endpoint on your back end server calls the Validate()
function to validate the phone number. If unsuccessful, the server calls the Challenge()
function and then returns the results, including customer information. Refer to the following example fields that return and then prefill on a form for the customer to verify.
withOtpFallback(otpStart: otpStartStep, otpFinish: otpFinishStep)
, requires implementing the OtpStartStep
and OtpFinishStep
. The default implementation is below, but you can also view the other tabs if you wish to enable advanced capabilities.
The OTP session has a two minute timeout from when it’s sent through SMS to when the customer can enter in the OTP.
/v3/start
endpoint. In this case, you’ve already prompted for a phone number so you don’t need to prompt for it in the client SDK.Since you passed the phone number in the Start()
function, call callback.onSuccess(input: nil)
to communicate to the SDK you have the customer’s agreement to deliver the SMS message.callback.onError()
method to communicate to the SDK any issues while trying to obtain the phone number or the OTP. Report an error if the customer cancels the SMS transaction or presses the back button to leave the screen.Complete()
call can then verify the customer information.