onetaplogin

A Flutter plugin for Bureau's OnetapLogin and Device Intelligence product.Device Fingerprinting helps you understand your user’s unique harware with their device data. It efficiently syncs the data in the background, processes them and the data processed can be used to generate a fingerprint id.

Usage

To use this plugin, add co.onetaplogin/onetaplogin as a dependency in your pubspec.yaml file

Example

on Production

// Import package
import 'package:onetaplogin/onetaplogin.dart';

// Authenticate : msisdn should be starting with 91
// To use OneTapLogin as a standalone product
var status = await Onetaplogin.authenticate(
          clientID,
          txnID,
          msisdn);
// To use Device Intelligence as a standalone product	  
var status = await Onetaplogin.submitDeviceIntelligence(         //Here the status returned is a string and contains the finger print sdk's success or failure message

          clientID,
          sessionId,
          userId);
	  
// To use both OneTapLogin and Device Intelligence
var status = await Onetaplogin.authenticateWithDeviceIntelligence(
          clientID,
          txnID,
          msisdn);

on Sandbox

// Import package
import 'package:onetaplogin/onetaplogin.dart';

// Authenticate : msisdn should be starting with 91
// To use OneTapLogin as a standalone product
var status = await Onetaplogin.authenticate(
          clientID,
          txnID,
          msisdn, env : "Sandbox");
// To use Device Intelligence as a standalone product	  
var status = await Onetaplogin.submitDeviceIntelligence(                       //Here the status returned is a string and contains the finger print sdk's success or failure message

          clientID,
          sessionId,
          userId, env : "Sandbox");	  
	  
// To use both OneTapLogin and Device Intelligence
var status = await Onetaplogin.authenticateWithDeviceIntelligence(
          clientID,
          txnID,
          msisdn, env : "Sandbox");

The status object for submitDeviceIntelligence and authenticateWithDeviceIntelligence method would be a Bureau's own custom class that has the following properties.
  1. isSuccess boolean to check the success of deviceintelligence.
  2. errorMessage and errorCode to pinpoint errors in the case isSuccess is false and empty for true cases.
  3. authStatus that returns the authentication status if merchant uses the onetap login feature.

Android outer level build.gradle changes

pluginManagement {
    buildscript {
        repositories {
            mavenCentral()
            maven {
                url = uri("https://storage.googleapis.com/r8-releases/raw")
            }
        }
        dependencies {
            classpath("com.android.tools:r8:8.2.24")
        }
    }
}

Android Manifest changes


//Add the folowing call if targeting S+ devices
<activity>
android:exported="true"
</activity>
........

<application
    android:usesCleartextTraffic="true"
</application>

or if you are using network config

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="false">PLEASE CONTACT BUREAU TO GET DOMAIN</domain>
    </domain-config>
</network-security-config>

iOS

Make below changes to Info.plist

	<key>NSAppTransportSecurity</key>
	<dict>
	  <key>NSAllowsArbitraryLoads</key>
	      <true/>
	</dict>