Learn how to integrate the client-side iOS SDK into your web application
mobile
to the Unify()
function on the server. In a mobile flow, the mobile phone performs one-time password (OTP) validation.
In the mobile flow, once OTP validation is complete, the AuthFinishStep
function executes.
Authenticate()
authToken
as a parameter for the Authenticate()
function. This token returns from the Unify()
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
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 UnifyStatus()
function to validate the phone number.
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.