Skip to main content
Infisical supports two methods for connecting to Heroku: OAuth and Auth Token. Choose the method that best fits your setup and security requirements.
  • OAuth Method
  • Auth Token Method
The OAuth method provides secure authentication through Heroku’s OAuth flow.
Using the Heroku Connection with OAuth on a self-hosted instance of Infisical requires configuring an API client in Heroku and registering your instance with it.Prerequisites:
  • A Heroku account with existing applications
  • Self-hosted Infisical instance
1

Create an API client in Heroku

Navigate to your user Account settings > Applications to create a new API client.
Heroku config settings
Heroku config applications
Heroku config new app
Create the API client. As part of the form, set the OAuth callback URL to https://your-domain.com/organization/app-connections/heroku/oauth/callback.
The domain you defined in the OAuth callback URL should be equivalent to the SITE_URL configured in your Infisical instance.
Heroku config new app form
2

Add your Heroku API client credentials to Infisical

Obtain the Client ID and Client Secret for your Heroku API client.
Heroku config credentials
Back in your Infisical instance, add two new environment variables for the credentials of your Heroku API client:
  • INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_ID: The Client ID of your Heroku API client.
  • INF_APP_CONNECTION_HEROKU_OAUTH_CLIENT_SECRET: The Client Secret of your Heroku API client.
Once added, restart your Infisical instance and use the Heroku Connection.

Setup Heroku OAuth Connection in Infisical

1

Navigate to App Connections

Navigate to the App Connections page in the desired project.
App Connections Tab
2

Add Connection

Select the Heroku Connection option from the connection options modal.
Select Heroku Connection
3

Choose OAuth Method

Select the OAuth method and click Connect to Heroku.
Connect via Heroku OAuth
4

Grant Access

You will be redirected to Heroku to grant Infisical access to your Heroku account. Once granted, you will be redirected back to Infisical’s App Connections page.
Heroku Authorization
5

Connection Created

Your Heroku Connection is now available for use.
Heroku OAuth Connection