The Nevis Mobile Authentication Client SDK for React Native 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.
This React Native plugin 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 React Native 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.
Your development setup has to meet the following prerequisites:
com.android.tools.build:gradle
7.4.2 or laterorg.jetbrains.kotlin:kotlin-gradle-plugin
1.8.21 or laterTo add Nevis Mobile Authentication Client SDK to your React Native application read the installation instructions below. Below are the required instructions for Nevis Mobile Authentication SDK to work correctly.
React Native Application dependencies
Add the nevis-mobile-authentication-sdk-react
package to your React Native application.
yarn add @nevis-security/[email protected]
Gradle Configuration
Add the following to your android/gradle.properties
file:
android.useAndroidX=true
android.enableJetifier=true
android.enableDexingArtifactTransform=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 the 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.7.+'
}
Warning The package repository only exposes the
debug
flavor. To use therelease
flavor contact us on [email protected].
Dependency Configuration
To integrate Nevis Mobile Authentication Client SDK into your React Native 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 FaceID for iOS
Modify your applications Info.plist
file to add a description for the NSFaceIDUsageDescription
key in order to use the FaceID authenticator. Ideally, this value should be localised.
<key>NSFaceIDUsageDescription</key>
<string>Enabling Face ID allows you to use the Face Recognition authenticator.</string>
Object destructuring is currently not supported by the Nevis Mobile Authentication Client SDK for React Native.
The current implementation relies heavily on using this
inside functions defined in the API classes.
As consequence, if object destructuring is used to extract
a function from any of the API classes, upon the execution of that destructured function, the this
context will be different. This results in the Nevis Mobile Authentication Client SDK for React Native showing unexpected behaviour like errors at runtime.
You can deal with this for example by invoking method calls the "old-fashioned way".
For example:
Instead of
const { cancelAuthentication } = await handler.listenForOsCredentials();
use
const authenticationListenHandler = await handler.listenForOsCredentials();
...
await authenticationListenHandler.cancelAuthentication();
Nevis Mobile Authentication Client SDK for React Native is released under a commercial license. See LICENSE for details.
© 2023 made with ❤ by Nevis
Generated using TypeDoc