goldwarden/agent/systemauth/biometrics/touchid.go

19 lines
316 B
Go
Raw Normal View History

2023-09-12 02:22:48 +03:00
//go:build windows || darwin
package biometrics
func CheckBiometrics(approvalType Approval) bool {
2023-09-12 02:26:16 +03:00
ok, err := touchid.Authenticate(approvalType.String())
2023-09-12 02:22:48 +03:00
if err != nil {
log.Fatal(err)
}
if ok {
log.Printf("Authenticated")
return true
} else {
log.Fatal("Failed to authenticate")
return false
}
}