Integrating LaunchKey Core Auth SDK

This document walks you through integrating the LaunchKey Core 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.

Setting up the LaunchKey Service

Via LaunchKey Authenticator App

Before integrating the LaunchKey Authenticator SDK with your app, an administrator must complete the following steps:

  1. From a mobile device, download and install the LaunchKey Authenticator app from either the Google Play Store or the Apple App Store.

  2. Run the LaunchKey Authenticator app and tap Get Started.

  3. Complete the Link page. This includes:

    • A username and device name. You will use this username to log into the LaunchKey Admin Center. The device name will appear when you review linked devices.

    • Choose which communication channel you want to use to complete account creation and device registration. You can choose Email and/or SMS. Accept the terms and agreements, then tap Done.

  4. Based on the linking method(s) you chose, you will receive an email and/or text message with a link that you must follow to complete account creation and link your device to the LaunchKey Admin Center.

  5. Now that the device is configured, you must associate it with a service in the LaunchKey Admin Center. From a browser, open the LaunchKey Admin Center.

  6. To log in, enter the username that you entered into the LaunchKey Authenticator app when you linked the device.

  7. On the device, authorize the login. If any security auth methods have been enabled, you will be prompted to complete them before you can complete authorization.

  8. Now that you are in the LaunchKey Admin Center, click the left navigation button and select Organizations. The All Organizations page appears.

  9. Click the New Organization button. The Create New Organization screen appears.

  10. Enter a name for the organization, provide your name and email address (or name and email address of an admin user). Complete the Create New Organization Screen.

  11. The user whose email you entered will receive a confirmation email. Click the confirmation email to complete creation of the organization.

  12. Back in the LaunchKey Admin Center, open the organization you created. Expand the menu button on the left of the screen and select Organizations, then click the organization.

  13. From within the organization, select the Directories tab.

  14. Click the New Directory button to create a new directory. Enter a name for the directory and click the Submit button.

  15. Directory details appear. From here, on the General tab, you can see a Authenticator SDK Keys list. Capture the Authenticator SDK Key. You will need it later when integrating the LaunchKey SDK into your app.

  16. Also on the General tab, under Services, click the NEW SERVICE button. The Create New Service screen appears.

  17. Enter a name and description for the service. Optionally choose an avatar file, read and accept the Terms of Service and click the Create Service button.

Setting up the LaunchKey Core 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.

...
<!-- IF INTERESTED IN SUPPORTING THE NOW-DEPRECATED PEBBLE KIT SDK -->
<uses-sdk tools:overrideLibrary="com.getpebble.android.kit"/>

<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.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

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

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 Core Auth SDK,

  • Include the SDK into your app.

  • Configure the SDK.

  • Allow end-users to configure their auth methods.

  • Handle Auth Requests.

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 {
        ...
        implementation 'com.launchkey.android.authenticator.sdk:lk-auth-sdk-core:1.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 Core Auth SDK for both platforms can be split up into separate packages/modules, each with their own set of responsibilities and functionality. To take advantage of our SDK, you need to setup each module. Begin with Authentication Management as it is a dependency for the others.

  1. Setup Authentication Management

  2. Setup AuthMethod Management

  3. Setup AuthRequest Management

Additional Configurations

The basic setup for the Core Auth SDK should now be fully configured. The SDK can be configured to use and handle additional features. It is recommended to read the following components to enable a more UX friendly experience for your application.

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. ×