This guide demonstrates how to use the Hanko FIDO UAF Client and the Hanko API to perform on-device authentication.
Unlike using the Hanko Authenticator, this scenario does not involve out-of-band communication. Instead of initiating
communication on a desktop through a browser and confirming authentication in response to out-of-band
notifications on a mobile device, all communication originates from the mobile device and runs through an application
backend which passes information to the Hanko API. In this guide you will learn how to
using the Hanko FIDO UAF Client.
Prerequisites
Add the Hanko FIDO UAF Client as a project dependency
- min. android SDK version: 23
- a secure keyguard (biometrics, pin, pattern, etc.)
To add the Hanko FIDO UAF Client to your Android project, add the following line to your build.gradle:Replace <latest-version> with the latest version. The latest version can be found here. Using Carthage:To integrate FidoUafClientiOS into your Xcode project using Carthage, specify it in your Cartfile:Using CocoaPods:To integrate FidoUafClientiOS into your project using CocoaPods, specify it in your Podfile:Replace <latest-version> with the latest version. The latest version can be found here.
HTTP client library
In order to make HTTP requests the relying party backend can proxy to the Hanko API, you need
a suitable HTTP client library (e.g. OkHttp for Android, Alamofire for iOS).
Hanko server-side SDK
To forward HTTP requests to the Hanko API you can use one of our server-side SDKs in your backend application.
Backend SDK examples for this step will be added once official server SDKs are available.
Configuration
Client availability across appsThe FIDO UAF Client is only available for your app. You can make it publicly available for all apps on the device.
Add the following to your AndroidManifest.xml: Face ID usageFidoUafClientiOS uses FaceID, so you must define NSFaceIDUsageDescription in your Info.plist.Operation promptsThe FidoUafClientiOS uses default values to display kSecUseOperationPrompt when using the private keys.
The default values are localized to English and German.
To override the default values just add the keys biomentryOperationPromptReg and biomentryOperationPromptAuth to your project’s Localizable.strings.If a request contains a transaction, the biomentryOperationPromptAuth will be overridden with the transaction content.
Customization
Operation promptsTo customize the strings which are displayed during registration and authentication, define the following strings in
your strings .xml file: Operation promptsThe FidoUafClientiOS uses default values to display kSecUseOperationPrompt when using the private keys. The default
values are localized to English and German. To override the default values just add the keys biomentryOperationPromptReg
and biomentryOperationPromptAuth to your project’s Localizable.strings.Note: If a request contains a transaction the biomentryOperationPromptAuth will be overridden with the transaction
content.
Obtain an API Key
You need access to the Hanko Authentication API, which is currently not publicly available. To request test access,
please contact us at info@hanko.io.