How to use the keytar.deletePassword function in keytar

To help you get started, we’ve selected a few keytar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cern-phone-apps / desktop-phone-app / public / electron.js View on Github external
storage.set('is_authenticated', {}, error => {
    keytar.deletePassword('cern-phone-app', 'access_token');
    keytar.deletePassword('cern-phone-app', 'refresh_token');
    keytar.deletePassword('cern-phone-app', 'tone_token');
    if (error) {
      console.log(`Error is_authenticated: ${error}`);
    }
    if (!authWindow) {
      createAuthWindow();
    }
    if (mainWindow) {
      mainWindow.destroy();
    }
  });
}
github ktmouk / hackaru-desktop / src / renderer / store / modules / auth.js View on Github external
'api/request',
        {
          url: '/v1/oauth/revoke',
          method: 'post',
          data: {
            client_id: state.uid,
            client_secret: state.secret,
            token: state.accessToken
          }
        },
        { root: true }
      );
    } catch (e) {
      dispatch('toast/error', e, { root: true });
    }
    await keytar.deletePassword(state.service, state.uid);
    commit(CLEAR_ACCESS_TOKEN);
  },
  async restoreAccessToken({ state, commit }, url) {
github atom / github / lib / github / auth / github-auth.js View on Github external
deleteToken () {
    const tokenResult = keytar.deletePassword(KEYCHAIN_SERVICE_NAME, KEYCHAIN_ACCOUNT)
    this.emitter.emit('did-delete-token')
    return tokenResult
  }
github dracan / tomatoad / src / main / slack / slack.main.js View on Github external
revokeTeam: function(teamName) {
        delete _authTokens[teamName]
        keytar.deletePassword("Tomatoad_Slack", teamName)
    },
github fatihacet / CoinTop / src / renderer / services / credentials.js View on Github external
async removeCredential(exchange) {
    return keytar.deletePassword(APP_NAME, exchange);
  },
};
github cheshire137 / gh-notifications-snoozer / src / models / GitHubAuth.js View on Github external
static deleteToken() {
    keytar.deletePassword(SERVICE, ACCOUNT)
    if (isTest) {
      storage.delete(KEY)
    }
  }
github codehangar / reqlpro / shell / keychain.service.js View on Github external
function updateCert(host, port, cert) {
  const account = getAccountNameForCert(host, port);
  if (cert) {
    return keytar.setPassword(SERVICE_NAME, account, cert);
  } else {
    return keytar.deletePassword(SERVICE_NAME, account);
  }
}
github thundernet8 / StarCabinet / src / main / services / credentials.js View on Github external
const mainDeleteCredentials = username => {
    return keytar.deletePassword(CONSTANTS.APP, username);
};
github wexond / desktop / src / main / services / messaging.ts View on Github external
ipcMain.on(`credentials-remove-${id}`, async (e, data: IFormFillData) => {
    const { _id, fields } = data;
    const view = appWindow.viewManager.selected;

    await storage.remove({
      scope: 'formfill',
      query: {
        _id,
      },
    });

    await deletePassword('wexond', `${view.hostname}-${fields.username}`);

    appWindow.viewManager.settingsView.webContents.send(
      'credentials-remove',
      _id,
    );
  });

keytar

Bindings to native Mac/Linux/Windows password APIs

MIT
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis