atom / node-keytar

Native Password Node Module

Home Page:https://atom.github.io/node-keytar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading from Electron 12.0.5 to 13.1.1 brings undesirable behavior change

rpatrick00 opened this issue · comments

Prerequisites

Description

In Electron 12.0.5, we are using keytar's getPassword() method on each credential to load it at application startup. In Electron 13.1.1, the user is prompted to enter their "login keychain password" because the app is trying to access the user's MacOS keychain (where keytar stores the credentials on MacOS). While I think that it is reasonable to get the user's permission, the current behavior is to ask the user n times--once for every getPassword() call. In our app, the user can have dozens of fields that are sensitive and being saved as credentials.

Steps to Reproduce

  1. Create an app that loads and then saves a dozen passwords.
  2. Run the app to trigger loading and saving of the passwords.
  3. Observe the behavior of the user being prompted to input their password 12 times.

Expected behavior:

While I liked the previous "no prompt" behavior, I understand the need to get permission from the user to access the credential store. I expect that the user is prompted once and then not prompted again (or at least not until they restart the application).

Instead, the user is prompted once for each getPassword API call (as far as I can tell).

Reproduces how often:

This is completely reproducible 100% of the time.

Versions

MacOS 10.15.7
Electron Version 13.1.1

Additional Information