GustavoASC/google-drive-vscode

Develop command to remove configured credentials

Opened this issue ยท 8 comments

i did the following steps and ifaced following error:"Cannot destructure property 'client_secret' of 'credentials.installed' as it is undefined." so i tried doing the steps from first but i couldnt change my credentials json file to the fresh one i installed now.

Hello @nishgovinnd, how are you?

Thanks for opening this issue ๐Ÿ˜„.

I suspect the credentials.json file you have downloaded is not configured for Desktop app on Google Console.
I suggest you configure the Google Drive API on your account again, doing the following steps:

  1. Access this link to turn on the Drive API

  2. Click on Enable the Drive API button

  3. On the modal pop-up, make sure you have Desktop app selected, like this:
    image

  4. Click Create

  5. Click Download client configuration

Hope it helps!

Uhm... that's interesting. The extension tries to remove any old configured credentials but maybe that's not working for some reason. What OS/distro are you using? And what VSCode version are you using?

Thanks in advance!

I will try to simulate this problem on the next few days, as soon as I have a free time, and proceed with the fix in case it is a bug.

For now I'd gently ask you to manually delete the credentials on Windows 10 key vault, so you can forcefully configure the Google Drive credentials as if it were the first time you were using the extension on VSCode.

Please do the following steps for that:

  1. Open Control panel
  2. Open Credential manager
  3. Select Windows credentials
  4. Manually delete these two credentials for your user. (When you click on it a button/link "Remove" will appear)

image

Great! I am happy it worked ๐Ÿ˜ƒ

Besides, even though we had success removing the old credentials through Control Panel, I still believe we could develop a command to remove old credentials through the VSCode extension itself. The name of this command would be something like: Google Drive: Remove configured credentials.

In case of someone does not want to use the extension on a specific computer anymore, for any reason, he or she can easily remove the configured credentials no matter the OS. One would not need to manually access the Control Panel anymore.

I will keep the issue open so this command can be developed.