google-drive-vscode icon indicating copy to clipboard operation
google-drive-vscode copied to clipboard

Show a proper notification when incorrect credentials.json file is used

Open GustavoASC opened this issue 4 years ago • 0 comments

Introduction

In order to use the extension, user needs to download a credentials.json file configured for Desktop app on Google Console. Here are the suggested steps to download the credentials:

  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

Problem

Sometimes people download a wrong credentials file or select Web App instead of Desktop app.

It causes unexpected behavior on the extension, which throws errors like "Cannot destructure property 'client_secret' of 'credentials.installed' while running the command Google Drive: Configure credentials.

Suggestion

This issue is meant to show a proper notification when the incorrect credentials.json file is used, instead of throwing errors related to "undefined" objects.

Pull Requests are welcome :smiley:

GustavoASC avatar Oct 06 '20 21:10 GustavoASC