Prerequisites

Install the OTPLESS SDK dependency by running the following command in your terminal at the root of your React Native project before utilizing OtplessSecureService:

npm install otpless-ionic

Step 1: Add OtplessSecureService dependencies

To integrate OtplessSecureService into your project, include the following dependency in your app-level build.gradle file under the dependencies section:

In your project-level build.gradle, add the following:

Make sure to sync your project with Gradle after adding this dependency.

Step 2: Instantiate the OtplessManager

Create an instance of OtplessManager in your javascript/typescript file.

Step 3: Attach OtplessSecureService in your LoginScreen.

When your login screen launches, attach the OtplessSecureService using your APP_ID. This ensures the secure service is properly initialized on Android platforms and ready to use before authentication.