Authentication for the JetBrains plugins

To scan your Projects you must authenticate with Snyk.

Snyk supports the following protocols for authentication:

  • OAuth 2.0 (default)

  • Snyk API token (fallback option)

Steps to authenticate using the OAuth 2.0 protocol

To authenticate follow these steps:

  1. After the extension is installed, click the Snyk icon in the navigation bar, then click Trust project and scan.

Snyk idon and connect and trust
Snyk icon and connect and trust
  1. The extension opens a new page in a default browser and asks you to log in to your Snyk account:

Snyk login
Snyk login
  1. The next page asks for your authorization for the IDE to act on your behalf. Click Grant app access.

Grant app access
Grant app access
  1. After you authenticate successfully, view the confirmation message.

Successful authentication
Successful authentication
  1. The IDE reads and saves the authentication on your local machine. Close the browser window and return to the IDE.

The analysis starts automatically. If you have problems, see OAuth 2.0 authentication does not work.

OAuth 2.0 tokens are not static and cannot be copied from Snyk account page.

Steps to authenticate using your Snyk API token

To authenticate follow these steps:

  1. In the JetBrains plugin navigate to Preferences > Tools > Snyk.

  2. Find the Authentication Method and change it to Token authentication

  3. Copy your API token. For details, see Obtain and use your Snyk API token.

  4. Paste or enter the token in the Token field.

  5. Click Apply or OK. The analysis starts automatically.

How to switch accounts

To re-authenticate with a different account, follow these steps:

  1. In the JetBrains plugin, navigate to Preferences > Tools > Snyk.

  2. Clear the value of the Token field.

  3. Click Apply or OK.

  4. When you have logged out, start authentication from scratch.

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

Was this helpful?

Revision created

Add comment to emphasize required filters hidden in GitBook collapsed field