Visual Studio Code extension authentication
To scan your projects you must authenticate with Snyk. The extension uses your Snyk API token for authentication. To store the token securely, Snyk uses Secret Storage API, which uses the system's keychain to manage the token.
Logging in
To authenticate follow these steps:
Once the extension is installed, click on the Snyk Icon in the left navigation bar:
Click Connect VS Code with Snyk. The extension relies on the Snyk authentication API and asks you to authenticate your machine against the Snyk web application:
Click Authenticate.
After successful authentication, view the confirmation message. If you need to authenticate using your API token, How to obtain and authenticate with your Snyk API token. Be sure to use your personal token.
Close the browser window and return to VS Code. VS Code is now reading and saving the authentication on your local machine.
Switching accounts
To re-authenticate with a different account, follow these steps:
Run the provided
Snyk: Log Out
command.When you have logged out, click Connect VS Code with Snyk to authenticate with a different account.
Or you run Snyk: Set Token
command and set your token in the text field manually.
Requirements for Linux and Unix
When authenticating with Snyk, users have the option to copy the authentication URL to their clipboard.
For Linux and Unix users, this requires that the xclip
or xsel
utility be installed.
Last updated