Learn how to integrate the client-side Android SDK into your web application
.aar
. The minimum supported version of Android is v7, level 24.
Prove manages a maven repository with Android binaries to enable integration with Gradle.
Update the dependencies object in the build.gradle
file:
settings.gradle
file with the Maven repository:
build.gradle
file to also download dependency libraries:
application@fullBackupContent
value, you can resolve it by adding this line of code to your application AndroidManifest.xml
file inside the <application>...</application>
node. Add it as an attribute to the opening application
tag:
mobile
to the Unify()
function on the server. In a mobile flow, OTP validation is performed on the mobile phone.
In the mobile flow, once OTP validation is complete, the AuthFinishStep function executes.
authToken
as a parameter for the Authenticate()
function. This token returns from the Unify()
call of the server SDK. The token is session specific, limiting it to a single flow. It also expires after 15 minutes.
authToken
authToken
, build the authenticator for the mobile flow.
Builder
class offers a withTestMode(boolean testMode)
method. This method permits simulated successful session results while connected to a Wi-Fi network only. Testing using a Wi-Fi connection is useful in the Sandbox environment.ProveAuth
object is thread safe. You can use it as a singleton. Most Prove Auth methods are blocking and therefore can’t execute in the main application thread. The application employs an executor service with a minimum of two threads to manage threads due to the SDK’s ability to process concurrent blocking requests.
Validate()
function to check phone number validation. If it was successful, the server returns the results from the Challenge()
function, including customer information.
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 OtpStartStepCallback.onSuccess(OtpStartInput);
to communicate to the SDK you have the customer’s agreement to deliver the SMS message. Ensure you return an instance of OtpStartInput
with empty string or null
to OtpStartStepCallback.onSuccess()
function.OtpStartStepCallback.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.In the finish step, call the OtpFinishStepCallback.onSuccess(OtpFinishInput);
method to return the collected OTP value wrapped in OtpFinishInput
.