Skip to content

Commit 14f5b4d

Browse files
committed
Remove keytar
1 parent 3c1a2da commit 14f5b4d

File tree

4 files changed

+8
-237
lines changed

4 files changed

+8
-237
lines changed

gitpod-web/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "https://github.com/gitpod-io/gitpod/issues"
1515
},
1616
"engines": {
17-
"vscode": "^1.75.0"
17+
"vscode": "^1.83.0"
1818
},
1919
"enabledApiProposals": [
2020
"resolvers",
@@ -624,7 +624,6 @@
624624
"@parcel/watcher": "^2.1.0",
625625
"@tsconfig/svelte": "^2.0.0",
626626
"@types/js-yaml": "^4.0.5",
627-
"@types/keytar": "^4.4.2",
628627
"@types/node": "16.x",
629628
"@types/node-fetch": "^2.5.12",
630629
"@types/uuid": "8.0.0",

gitpod-web/src/authentication.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33
*--------------------------------------------------------------------------------------------*/
44

55
import * as vscode from 'vscode';
6-
import type * as keytarType from 'keytar';
76
import fetch from 'node-fetch';
87
import { Disposable, GitpodExtensionContext } from 'gitpod-shared';
98
import Keychain from './util/keychain';
109

11-
type Keytar = {
12-
getPassword: typeof keytarType['getPassword'];
13-
setPassword: typeof keytarType['setPassword'];
14-
deletePassword: typeof keytarType['deletePassword'];
15-
};
16-
1710
interface SessionData {
1811
id: string;
1912
account?: {
@@ -65,15 +58,7 @@ export class GitpodAuthenticationProvider extends Disposable implements vscode.A
6558
this.context.logger.info('Reading sessions from keychain...');
6659
let storedSessions = await this._keychain.getToken();
6760
if (!storedSessions) {
68-
// Fallback to old behavior
69-
this.context.logger.warn('Falling back to deprecated keytar logic');
70-
71-
const keytar: Keytar = require('keytar');
72-
storedSessions = await keytar.getPassword(`gitpod-code-gitpod.login`, 'account');
73-
if (!storedSessions) {
74-
return []
75-
}
76-
await keytar.deletePassword(`gitpod-code-gitpod.login`, 'account');
61+
return [];
7762
}
7863
this.context.logger.info('Got stored sessions!');
7964

gitpod-web/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const config = {
2020
vscode: "commonjs vscode",
2121
bufferutil: "bufferutil",
2222
"utf-8-validate": "utf-8-validate",
23-
"keytar": "commonjs keytar"
2423
},
2524
resolve: {
2625
extensions: ['.ts', '.js']

0 commit comments

Comments
 (0)