Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First write doesn't trigger Face ID authentication #551

Open
henlund opened this issue Nov 30, 2022 · 0 comments
Open

First write doesn't trigger Face ID authentication #551

henlund opened this issue Nov 30, 2022 · 0 comments

Comments

@henlund
Copy link

henlund commented Nov 30, 2022

I'm using Face ID authentication to protect items in the keychain. However, the authentication dialog is not triggered when a new value is written. Only when reading and overwriting the value for the same id, the dialog is displayed. Is this intended behaviour?
Also the string passed to .authenticationPrompt() is never displayed. Where is it supposed to show up?

func save(data: String, id: String) async {
    try? keychain
      .accessibility(.whenPasscodeSetThisDeviceOnly, authenticationPolicy: [.biometryAny])
      .authenticationPrompt("This text is never shown")
      .set(data, key: id)
  }

  func load(id: String) async -> String? {
    try? keychain
      .authenticationPrompt("This text is never shown")
      .get(id)
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant