Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yudiz-solutions/local-authentication
https://github.com/yudiz-solutions/local-authentication
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/yudiz-solutions/local-authentication
- Owner: yudiz-solutions
- Created: 2018-10-03T12:49:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-31T12:40:41.000Z (about 1 year ago)
- Last Synced: 2023-10-31T13:35:48.217Z (about 1 year ago)
- Language: Swift
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local Authentication
This's a demonstration repo in order to make it easier for others to implement **LocalAuthentication** sdk in your project, all comments and pulls requests are appreciated.
** Note **
Authenicating user using with FaceID required **NSFaceIDUsageDescription** in Info.plist.### Sample Code
```
LocalAuthentication.shared.authenticateUserWithBioMetrics(kReasonMessage) { [weak self] (authenticationState) in
guard let self = self else {
return
}
switch authenticationState {
case .success:
self.showAlert("Successfully Authenticated")
case .canceledByUser, .fallback, .canceledBySystem:
break
case .passcodeNotSet:
self.showAlert(authenticationState.message(), block: { (action) in
self.redirectUserToSetting()
})
default:
self.showAlert(authenticationState.message())
}
}
```