Integrating LaunchKey Auth SDK

This document walks you through integrating the LaunchKey Auth SDK for iOS and Android apps. To use our library, you must have the LaunchKey Service and LaunchKey Core Auth SDK configured and connected. This SDK is used primarily as a UI addon to the Core Auth SDK to provide default views/actions for a quicker setup process.

Setting up the LaunchKey Auth SDK

Requirements & Important Information

Platform versions

Android API versions

Minimum

Target

21

29

iOS versions

Minimum

Latest

9

13

App Permissions

These permissions are declared in the SDK’s manifest and are automatically merged by the Android Gradle plugin. Keep this in mind if your build process modifies the manifest for any reason.

...
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>

<!-- Permission required by Samsung's Pass SDK -->
<uses-permission android:name= "com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY"/>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

<!-- Stated so the Camera permission does not make this feature an implicit hard requirement -->
<uses-feature android:required="false" android:name="android.hardware.camera" />
<uses-feature android:required="false" android:name="android.hardware.camera.autofocus"/>

<!-- Needed only if your app targets Android 5.0 (API level 21) or higher. -->
<uses-feature android:name="android.hardware.location.gps" />

<!-- Permissions required for Locations & Google Maps v2 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<!-- Google Maps API requires OpenGL ES 2 -->
<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>

Add the following .plist permissions to your project and provide description values for each permission.

Required
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Bluetooth is used for the Wearables auth method</string>
<key>NSCameraUsageDescription</key>
<string>The camera is used to capture QR codes</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location services are used for the Locations auth method</string>
<key>NSFaceIDUsageDescription</key>
<string>Face ID is used as an auth method</string>

//Required for Xcode 11+
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Bluetooth is used for the Wearables auth method</string>

Integrating the SDK into your App

To use the Auth SDK,

  • Include the SDK into your app.

  • Configure the SDK.

  • Allow end-users to configure their auth methods.

  • Handle Auth Requests.

  • Optional: Customize the UI

Note

This SDK is meant to be used with the Core Auth SDK. If you have not integrated it already, please do so before continuing.

Including the SDK into your app

Our SDK artifacts and source code are publically available here for Android and iOS.

  1. Include our maven github repo in your project level build.gradle
    allprojects {
        ...
        repositories {
        ...
            maven {
                url "https://github.com/iovation/launchkey-android-authenticator-sdk/raw/master/lk-auth-sdk"
            }
        }
    }
    
  2. Include the SDK as a dependency in your app level build.gradle
    dependencies {
        ...
        // Core Auth SDK to use it
        implementation 'com.launchkey.android.authenticator.sdk:lk-auth-sdk-core:1.0.0'
    
        // Auth SDK
        implementation 'com.launchkey.android.authenticator.sdk:lk-auth-sdk-ui:5.0.0'
    }
    
  3. Ensure that the permissions requirements are met.

  1. Download the latest SDK from our release page.

  2. Add the Authenticator framework to your project.
    • In Xcode 11, add Authenticator.framework to your project, as an embedded framework. Ensure the framework is visible in your build target’s Frameworks, Libraries, and Embedded Content with the option Embed & Sign selected.

    • In Xcode 10 and earlier, ensure the framework is visible in your build target’s Embedded Binaries and Linked Frameworks and Libraries.

  3. Ensure that the permissions requirements are met.

After including the sdk into your app, you must configure the sdk. Read the next section for more information.

Configuring the SDK

The Auth SDK for both platforms can be split up into separate packages/modules, each with their own set of responsibilities and functionality.

  1. Setup Authentication UI Management

  2. Default Views

  3. Customizing the UI (Android)

  4. Customizing the UI (iOS)

User Contributed

LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way guarantee or warrant the quality and security of these code bases. User contributed code is supported by the creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to LaunchKey support at https://launchkey.com./support. ×