Skip to content

Commit

Permalink
Add local authentication without refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfej94 committed Nov 30, 2021
1 parent 68d0768 commit 95116cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PassportKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "PassportKit"
spec.version = "1.6.2"
spec.version = "1.6.3"
spec.license = "MIT"
spec.summary = "Swift library used for quick and easy oauth authentication."
spec.homepage = "https://github.com/appoly/PassportKit"
Expand Down
7 changes: 7 additions & 0 deletions Sources/PassportKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ public class PassportKit: NSObject {
}


public func localAuthententication(biometricsEnabled: Bool, completion: @escaping (Bool) -> Void) {
ownershipAuthentication(policy: biometricsEnabled ? .deviceOwnerAuthenticationWithBiometrics : .deviceOwnerAuthentication) { [weak self] result in
completion(result == .authorised)
}
}


private func ownershipAuthentication(policy: LAPolicy, reason: String? = nil, completion: @escaping (RefreshResult) -> Void) {
let context = LAContext()
var error: NSError?
Expand Down

0 comments on commit 95116cb

Please sign in to comment.