Authentication for the Eclipse plugin

To scan your Projects, you must authenticate with Snyk.

Snyk supports the following protocols for authentication:

  • OAuth 2.0 (Recommended)

  • Personal Access Token

  • Snyk API token (Legacy)

Authentication methods available in the Snyk plugin in Eclipse

Steps to authenticate using the OAuth 2.0 protocol

After the plugin is installed, follow these steps to authenticate:

  1. In the dialog that opens, set the Snyk API endpoint for a custom multi-tenant or single-tenant setup. For details, see IDE URLs. Multi-tenant users who do not belong to the SNYK-US-01 region ( https://api.snyk.io) will be automatically redirected to the correct domain for the email with which the user authenticated. This redirect will not happen if users are expected to use a custom URL, such as in single-tenant company configurations. When you are finished with the settings on this page, click Next.

Snyk endpoint configuration
  1. On the next page, follow the prompts, then click Finish.

Additional information and finish
  1. A new browser page opens, requiring you to log in to your Snyk account.

  2. In the next prompt, the Snyk IDE plugin requests access to act on your behalf. Click Grant app access.

  3. After you have successfully authenticated, a confirmation message appears. Close the browser window and return to the IDE.

The analysis starts automatically. The IDE reads and saves the authentication tokens on your local machine.

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

If you have problems, see OAuth 2.0 authentication does not work.

Steps to authenticate using your Personal Access Token

To authenticate using the Personal Access Token, follow these steps:

  1. Navigate to Eclipse > Settings > Snyk. (On Windows/Linux navigate to Window > Preferences > Snyk)

  2. Set the Authentication Method to Use Personal Access Token.

  3. Click the Connect IDE to Snyk button.

  4. Create your Personal Access Token. For details, see the Authentication for API page.

  5. Add the token in the Token field.

  6. Click Apply and Close.

The analysis starts automatically.

Steps to authenticate using your Snyk API token

To authenticate using the API token, follow these steps:

  1. Navigate to Eclipse > Settings > Snyk. (On Windows/Linux navigate to Window > Preferences > Snyk)

  2. Set the Authentication Method to API token.

  3. Click the Connect IDE to Snyk button.

  4. Click Authenticate in the web browser window that opens.

  5. The API token is automatically updated in the API Token field.

  6. Click Apply and Close.

The analysis starts automatically.

Alternatively, copy the personal API token from your Snyk Web UI instance (default is https://app.snyk.io). Paste the token in the API Token field. For details, see Obtain and use your Snyk API token.

How to switch accounts

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

  1. Navigate to Preferences > Snyk.

  2. Clear the value in the Token field.

  3. Click Apply and Close.

  4. When you have logged out, start authentication again from the beginning.

Last updated

Was this helpful?