Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

Implement passkeys with the Android Tutorial App

Prev Next

Requirements

IDE

Android Studio

Android SDK

API 24 (Android 7, Nougat) to API 36 (Android 16, Baklava)

Gradle

9.3.1 (AGP 8.13.2)

Device

Android phone running Android 7 or newer

Web browsers

W3C WebAuth standard-compliant versions of:

  • Google Chrome

  • Microsoft Edge

  • Firefox

Download the Android SDK

  1. Login to the Digipass S3 Authentication Cloud portal.

  2. Locate the Software Downloads tile. If you don't see a link for Android SDK, click more, otherwise you may proceed to step 3.
    List of software downloads including Cordova, Web, and iOS SDK options.

  3. You should now be able to see all the available SDKs. Click Android SDK and download the zip file.
    Interface for downloading various SDKs including Cordova, Web, iOS, and Android.

Review the Android tutorial app settings

Learn how the Android tutorial app is configured in the server to see how your own client application would be set up.

  1. Return to the portal and locate the Authentication Cloud tile. Click Configure Server.
    Authentication Cloud settings with options to configure server and UI.

  2. Open the Configuration menu and click Apps.
    OneSpan dashboard showing signed-in user and navigation to Apps section.

  3. On the Apps page, search for Nok Nok Tutorial for Android and click on it.
    List of apps with highlighted entry for Nok Nok Tutorial for Android.

  4. You should see a page with the settings for Nok Nok Tutorial for Android:

    • Package Name/URL: android:com.noknok.android.tutorialappplus
      This name cannot be changed.

    • App Name: Nok Nok Tutorial for Android
      The app name displayed in the Server Console.

    • Facet ID1
      Both FIDO UAF and FIDO2/WebAuthn are checked, so the following fields will be available:          

      • FIDO UAF Facet ID

      • FIDO2 Facet ID

    • Adaptive Ruleset: tutorial2
      Sets the authentication flow based on the user's device and their response to challenges.

    • Supported OOB Modes: QR Code
      Specifies that a QR code will be sent to the user in case of out-of-band authentication.
      App configuration settings including package name, facet IDs, and supported modes.

  5. Once you have reviewed the Android tutorial app settings, you should also:

    1. Navigate to Configuration > Authentication Methods.

    2. Open FIDO2/WebAuthn and ensure that RP ID is not set to localhost but to http://staging.digipassone.com.

1 The Facet ID depends on the app signing key.
2 To see how each rule set works, you can access the link beneath the field labelled Click here to view Ruleset.

Build the Android tutorial app

Enable PIN and thumbprint authentication

  1. Launch Android Studio and Open3 the folder where you downloaded the Android App SDK.

  2. Navigate to nn_android_app-sdk_(version number) > AppSDK > android-studio > app_tutorial_plus > app.

  3. Select the build.gradle file and click OK.

  4. Add the following lines to the dependencies:

    //PIN and thumbprint authentication
        api "com.noknok:asm_pin"
        api "com.noknok:asm_native_fps"

    The comment is optional.    

  5. This will add PIN and thumbprint authentication to the Android tutorial app. If you scroll to the end of the build.gradle file, the code should look like this (note the closing bracket):
    Code snippet showing dependencies for Wear OS and HMS implementations in Android.

3 Depending on your version, you could also Open an existing Android Studio project.

Connect the Android tutorial app to Digipass S3 Authentication Cloud

  1. Run the Android tutorial app by:      

    1. installing it on your Android phone

    2. using an Android emulator.

  2. On your computer, open a browser and append this to the Authentication Cloud base URL /<tenant>/webapps/demo/gwtutorial/configure with <tenant> being your tenant name.4

  3. On the Web App Configuration page, ensure that the Configuration Version is set to automatic.

  4. Click Apply Configuration.
    Web app configuration settings including tenant, server host, and apply configuration button.

  5. Next, click Show QR Code. You should see the Configuration QR code dialog.
    A QR code for configuration, with instructions to scan using an application.

  6. If you installed the Android tutorial app on your phone, you can scan the QR code by:

    1. Clicking the menu icon on the upper left corner

    2. Clicking Scan QR Code on the menu.

  7. If you are using the Android Studio emulator, you will need to:      

    1. Save the QR code as a png or jpg

    2. Enable the virtual scene camera in Android Studio

    3. Inject the QR code image

    4. Navigate to the 3D scene to scan the code

  8. Scanning the QR code will enable the Android tutorial app to connect to the Digipass S3 Authentication Cloud.

4 Your tenant name appears in the header of the portal.

Test the Android tutorial app

  1. Open the Android tutorial app.

  2. If this is your first time using the Android tutorial app, you should see a screen with fields for Username and a Password.

  3. Feel free to enter any string as a username, but make sure to use "noknok" as your password.

  4. Click Setup and follow the instructions for registering a passkey.
    OneSpan app setup options including FIDO Auth, Mobile Device, and Photo ID.

  5. Once you have registered a passkey, log out.

  6. Test the new passkey by signing in with the username you used in Step 3 and clicking Next.
    OneSpan sign-in screen with username input and authentication options displayed.

  7. Depending on how you set up your passkey in Step 4, you will be asked to authenticate with either a PIN or your thumbprint.

  8. Once you have signed in, test payment transactions by clicking Transaction on the Android tutorial app menu.
    Menu options for registration, highlighting the 'Transaction' section for user selection.

  9. On the Complete a Transaction screen, enter a nominal account and click Next.

  10. You will be asked to Authorize Payment. Click Authorize.
    Prompt to authorize a payment of one dollar in a transaction interface.

  11. If you are able to authorize the transaction, then your passkey integration has been successful.

You can now proceed to Adding your Android application to the Digipass S3 Authentication Cloud.