Nevis Mobile Authentication SDK Flutter Plugin

pub package style: flutter lints

The Nevis Mobile Authentication SDK for Flutter is a plugin which is part of the Nevis Mobile Authentication solution which enables secure, seamless and passwordless authentication by letting users verify their account using their mobile device.

The framework enables applications to leverage FIDO UAF 1.1 authentication capabilities as implemented in the Nevis Identity Suite, Authentication Cloud or Identity Cloud backend. The SDK can be embedded in Flutter applications to provide an implementation of mobile authentication scenarios such as registration, web- and out-of-app authentication, in-app authentication, transaction confirmation and deregistration.

For more details please consult our Documentation Portal.

Getting Started

Requirements

Your development setup has to meet the following prerequisites:

  • iOS 12 or later
  • Xcode 15.2, including Swift 5.9.2
  • Android 7 or later, with API level 24 -or-
  • Android 10 or later, with API level 29, for the biometric authenticator to work
  • Android 11 or later, with API level 30, for the device passcode authenticator to work
  • Gradle 7.4 or later
  • Android Gradle Plugin com.android.tools.build:gradle 7.2.2 or later
  • Kotlin Gradle Plugin org.jetbrains.kotlin:kotlin-gradle-plugin 1.8.0 or later
  • Dart SDK 3.1.0 or later
  • OpenJDK 11 or 17

Installation

To add the nevis_mobile_authentication_sdk to your Flutter application read the install instructions. Below are some Android and iOS specifics that are required for the nevis_mobile_authentication_sdk to work correctly.

Android

Gradle Configuration

Add the following properties to your android/gradle.properties file depending on the Android Gradle Plugin (AGP) version you use:

AGP 8.3.x and above

android.useAndroidX=true
android.useFullClasspathForDexingTransform=true
shrink=false

AGP 8.2.x and below

android.useAndroidX=true
android.enableDexingArtifactTransform=false
shrink=false

Repository Configuration

The Nevis Mobile Authentication Client SDK for Android is published as a GitHub package. You have to specify the repository in your android/build.gradle file:

allprojects {
    repositories {
        google ()
        mavenCentral ()
        maven {
            url "https://maven.pkg.github.com/nevissecurity/nevis-mobile-authentication-sdk-android-package"
            credentials {
                username = <GITHUB_USERNAME>
                password = <GITHUB_PERSONAL_ACCESS_TOKEN>
            }
        }
    }
}

Warning Accessing GitHub packages requires you to have a GitHub account. You must provide a Personal Access Token, as described here.

Dependency Configuration

Declare Nevis Mobile Authentication Client SDK as a dependency in your android/app/build.gradle file:

dependencies {
  //noinspection GradleDynamicVersion
  debugImplementation 'ch.nevis:nevis-mobile-authentication-sdk-android-debug:3.8.+'
}

Warning The package repository only exposes the debug flavor. To use the release flavor contact us on sales@nevis.net.

iOS

Dependency Configuration

To integrate Nevis Mobile Authentication Client SDK into your Flutter application using CocoaPods, specify it in your Podfile:

pod 'NevisMobileAuthentication', :configurations => ['Release']
pod 'NevisMobileAuthentication-Debug', :configurations => ['Debug']

Bitcode Support

As the native iOS SDK does not provide Bitcode support, the following post install step needs to be added to the Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO' # NMA SDK does not support Bitcode
    end
  end
end

Enable Face Recognition

Modify your applications Info.plist file (located under ios/Runner) to add a description for the NSFaceIDUsageDescription key in order to use the Face Recognition authenticator. Ideally, this value should be localized.

<key>NSFaceIDUsageDescription</key>
<string>Enabling Face ID allows you to use the Face Recognition authenticator.</string>

License

Nevis Mobile Authentication SDK Flutter Plugin is release under a commercial license. See LICENSE for details.

© 2022 made with ❤ by Nevis

Libraries

nevis_mobile_authentication_sdk
Nevis Mobile Authentication SDK