hubspot-cms-vscode
hubspot-cms-vscode copied to clipboard
Auth flow breaks when using cloud IDEs
Describe the bug
Reported in slack
Noticed a flow issue for using the VS Code extension which uses the CLI, specific to cloud IDEs. If you use github code spaces or gitpod, and probably any other online IDE the VS Code extensions authenticate button sends you to the personal access key screen which is great, but then that page tries to automatically launch vs code and enter the auth. Cool feature except if you use a cloud version because it then doesn't give you a path to authenticate other than to install the CLI and manually do it in the terminal. The issue is that if you didn't know that was how you authed, you'd just assume it wasn't going to work for you and that it might be broken. Suggested fix is if we're using like a query parameter or something to prompt that VS code launching, we should display a modal or on screen prompt of some kind to the user giving them a choice, to auth by launching local vs code or by pasting the key or something.
Auth is handled in: https://github.com/HubSpot/hubspot-cms-vscode/blob/master/src/lib/commands/auth.ts