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.
To authenticate follow these steps:
- 1.Once the extension is installed, click on the Snyk Icon in the left navigation bar:
- 2.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:
- 3.Click Authenticate.
- 4.After successful authentication, view the confirmation message.
- 5.Close the browser window and return to VS Code. VS Code is now reading and saving the authentication on your local machine.
To re-authenticate with a different account, follow these steps:
- 1.Run the provided
Snyk: Log Outcommand.
- 2.Once logged out, click Connect VS Code with Snyk to authenticate with the different account.
Snyk: Log Out
Or you run
Snyk: Set Tokencommand and set your token in the text field manually.
Set token manually
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
xselutility be installed.