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

Cannot delete credential after manual change email from Credential Manager Windows

tiennguyen15 opened this issue · comments

Prerequisites

Description

Steps to Reproduce

  1. Create A new Credential from node-keytar, Check from Credential Manger. We will see the format:
  1. Open Credential Manager - click edit change email to tiennguyen151@gmail.com. You will see
  1. When we find credential from keytar.findCredentials( 'DesktopApp') -> it returns
    [ {account:tiennguyen15@gmail.com, password:****} ]
  2. But when we use keytar.deletePassword( 'DesktopApp') will not work. As I can see the source (keytar_win.cc) that the deletePassword, will combine service and account
    KEYTAR_OP_RESULT DeletePassword(const std::string& service, const std::string& account, std::string* errStr) { LPWSTR target_name = utf8ToWideChar(service + '/' + account);

Expected behavior:
keytar.deletePassword can delete without combine service and account

Actual behavior:
keytar.deletePassword cannot delete

Reproduces how often:
100%

Versions

keytar: 7.7.0
Windows OS: 10
Electron Version 13.1.1

Additional Information

I think we should have another option from the delete like a force to delete with combination service/account or only service only