BiometricAuthentication alternatives and similar libraries
Based on the "Security" category.
Alternatively, view BiometricAuthentication alternatives based on common mentions on social networks and blogs.
-
CryptoSwift
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift -
KeychainAccess
Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS. -
SSKeychain
Simple Objective-C wrapper for the keychain that works on Mac and iOS. -
SAMKeychain
Simple Objective-C wrapper for the keychain that works on Mac and iOS. -
RNCryptor
CCCryptor (AES encryption) wrappers for iOS and Mac in Swift. -- For ObjC, see RNCryptor/RNCryptor-objc -
Valet
Valet lets you securely store data in the iOS, tvOS, or macOS Keychain without knowing a thing about how the Keychain works. Itβs easy. We promise. -
UICKeyChainStore
UICKeyChainStore is a simple wrapper for Keychain on iOS, watchOS, tvOS and macOS. Makes using Keychain APIs as easy as NSUserDefaults. -
Locksmith
A powerful, protocol-oriented library for working with the keychain in Swift. -
SwiftKeychainWrapper
A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift. -
Themis
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms. -
SwiftyRSA
RSA public/private key encryption in Swift -
cocoapods-keys
A key value store for storing per-developer environment and application keys -
SwiftPasscodeLock
An iOS passcode lock with TouchID authentication written in Swift. -
Lockbox
Objective-C utility class for storing data securely in the key chain. -
SwCrypt
RSA public/private key generation, RSA, AES encryption/decryption, RSA sign/verify in Swift with CommonCrypto in iOS and OS X -
LTHPasscodeViewController
iOS 7 style Passcode Lock -
swift-sodium
Safe and easy to use crypto for iOS and macOS -
Smile-Lock
A library for make a beautiful Passcode Lock View -
Obfuscator-iOS
Secure your app by obfuscating all the hard-coded security-sensitive strings. -
TOPasscodeViewController
A modal passcode input and validation view controller for iOS -
SecurePropertyStorage
Helps you define secure storages for your properties using Swift property wrappers. -
SecureEnclaveCrypto
Demonstration library for using the Secure Enclave on iOS -
JOSESwift
A framework for the JOSE standards JWS, JWE, and JWK written in Swift. -
zxcvbn-ios
A realistic password strength estimator. -
CommonCrypto.swift
:trident: CommonCrypto in Swift, and more -
SipHash
Simple and secure hashing in Swift with the SipHash algorithm -
simple-touch
Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS. -
KKPinCodeTextField
A customizable verification code textField. Can be used for phone verification codes, passwords etc -
iOS-App-Security-Class
Simple class to check if app has been cracked, being debugged or enriched with custom dylib -
Keychain
:key: A keychain wrapper that is so easy to use that your cat could use it. -
Virgil Security Objective-C/Swift Crypto Library
Virgil Crypto stack Objective-C/Swift -
Virgil Security Objective-C/Swift SDK
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more. -
SCrypto
Elegant Swift interface to access the CommonCrypto routines -
SweetHMAC
A tiny and easy to use Swift class to encrypt strings using HMAC algorithms. -
BiometricAuth
Framework for biometric authentication (via TouchID) in your application -
TPObfuscatedString
Simple String obfuscation using core Swift. -
RSASwiftGenerator
Util for generation RSA keys on your client and save to keychain or convert into Data π π -
SwiftyKeychainKit
Modern Swift wrapper for Keychain Services API with the benefits of static typing -
Virgil SWIFT PFS SDK
Virgil PFS SDK Objective-C/Swift -
π Vault
Simple and Secure container for passwords and other sensitive data. -
VoiceItAPI1IosSDK
A super easy way to add Voice Authentication(Biometrics) to your iOS apps, conveniently usable via cocoapods
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of BiometricAuthentication or a related project?
README
BiometricAuthentication
Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication. It's very simple and easy to use that handles Touch ID and Face ID authentication based on the device.
Note: - Face ID authentication requires user's persmission to be add in info.plist.
<key>NSFaceIDUsageDescription</key>
<string>This app requires Face ID permission to authenticate using Face recognition.</string>
What's new in version 3.1
- Updated to Swift 5.0
- Implemented Result type as completion callback
Version 2.2
- Set AllowableReuseDuration (in seconds) to auto authenticate when user has just unlocked the device with biometric.
- This is pretty useful when app comes to foreground or device is just unlocked by the user and you want to authenticate with biometrics.
- If you don't want to reuse the recently used authentication then simply skip this step. ```swift
// set this before calling authenticateWithBioMetrics method (optional) BioMetricAuthenticator.shared.allowableReuseDuration = 60
### Version 2.1
- Check if **TouchID** or **FaceID** authentication is available for iOS device.



## Features
- Works with Apple Face ID (iPhone X, Xs, XR, XsMax) and other Touch ID having devices.
- Predefined error handling when recognition fails.
- Automatic authentication with device passcode on multiple failed attempts.
## Requirements
- iOS 12.0+
- Xcode 10+
- Swift 3.0+
## Installation
### CocoaPods
```ruby
pod 'BiometricAuthentication'
Carthage
github "rushisangani/BiometricAuthentication"
Usage
Authenticate with biometric
BioMetricAuthenticator.authenticateWithBioMetrics(reason: "") { (result) in
switch result {
case .success( _):
print("Authentication Successful")
case .failure(let error):
print("Authentication Failed")
}
}
- When reason specified as empty - default will be used based on the device. Ex. for iPhone X - "Confirm your face to authenticate.", For other devices - "Confirm your fingerprint to authenticate."
Can Authenticate with biometric
- Alternatively you can check before authentication by following. This will check that if device supports Touch ID or Face ID authentication and your app can use that as of now.
if BioMetricAuthenticator.canAuthenticate() {
BioMetricAuthenticator.authenticateWithBioMetrics(reason: "") { (result) in
// check result -> success or failure
}
}
Check for Face ID
- Check if device supports face recognition or not.
swift if BioMetricAuthenticator.shared.faceIDAvailable() { // device supports face id recognition. }
### Check for Touch ID - Check if device supports touch id authentication or not.
swift if BioMetricAuthenticator.shared.touchIDAvailable() { // device supports touch id authentication }
Fallback Reason
- Fallback reason title will be shown when first authentication attempt is failed.
- You can give alternate authentication options like enter 'username & password' when user clicks on fallback button.
- Default reason is empty, which will hide fallback button.
BioMetricAuthenticator.authenticateWithBioMetrics(reason: "Biometric Authentication", fallbackTitle: "Enter Credentials") { (result) in
switch result {
case .success( _):
// proceed further
case .failure(let error):
switch error {
case .fallback:
print("Authentication Failed")
// show alternatives on fallback button clicked
// for ex. - enter username/email and password
default:
break
}
}
}
BiometryLockedout
- When biometry authentication is locked out after multiple failed attempts. You can unlock it by passcode authentication.
- Provide your own passcode authentication reason here, default will be used if not provided.
BioMetricAuthenticator.authenticateWithPasscode(reason: message) { (result) in
switch result {
case .success( _):
// passcode authentication success
case .failure(let error):
print(error.message())
}
}
Error Handling
- There are various cases when biometric authentication can be failed.
- fallback
- Called when user clicks on provided fallback button.
- biometryNotEnrolled
- Called when no fingerprints or face is registered with the device.
- You can show message to register a new face or fingerprint here.
- Default message will be shown if not provided.
- canceledByUser
- Called when authentication canceled by user.
- canceledBySystem
- Called when authentication canceled by system when app goes into background or any other reason.
- passcodeNotSet
- Called when device passcode is not set and trying to use biometry authentication.
- We can ask user to set device passcode here by opening Settings Application.
- failed
- Called when multiple failed attempts made by user.
- You can show error message to user here.
- Default message can be shown if not provided.
- biometryLockedout
- Called when more than 5 failed attempts made using biometric authentication. This will locked your biometry system.
- You'll restrict user when this error is occured.
- Aleternatively you can ask user to enter device passcode to unlock biometry.
- biometryNotAvailable
- Called when device does not support Face ID or Touch ID authentication.
Example
BioMetricAuthenticator.authenticateWithBioMetrics(reason: "") { [weak self] (result) in
switch result {
case .success( _):
// authentication successful
self?.showLoginSucessAlert()
case .failure(let error):
switch error {
// device does not support biometric (face id or touch id) authentication
case .biometryNotAvailable:
self?.showErrorAlert(message: error.message())
// No biometry enrolled in this device, ask user to register fingerprint or face
case .biometryNotEnrolled:
self?.showGotoSettingsAlert(message: error.message())
// show alternatives on fallback button clicked
case .fallback:
self?.txtUsername.becomeFirstResponder() // enter username password manually
// Biometry is locked out now, because there were too many failed attempts.
// Need to enter device passcode to unlock.
case .biometryLockedout:
self?.showPasscodeAuthentication(message: error.message())
// do nothing on canceled by system or user
case .canceledBySystem, .canceledByUser:
break
// show error for any other reason
default:
self?.showErrorAlert(message: error.message())
}
}
}
See Example for more details.
License
BiometricAuthentication is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the BiometricAuthentication README section above
are relevant to that project's source code only.