diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 2fcd853d44..ce7c56d05a 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -393,8 +393,13 @@ async function queryForGithubToken(state: PersistentState): Promise { }; const newToken = await vscode.window.showInputBox(githubTokenOptions); - if (newToken) { - log.info("Storing new github token"); - await state.updateGithubToken(newToken); + if (newToken !== undefined) { + if (newToken === "") { + log.info("Clearing github token"); + await state.updateGithubToken(undefined); + } else { + log.info("Storing new github token"); + await state.updateGithubToken(newToken); + } } }