HEROKU ACCOUNT GUIDE

How to enable 2FA on Heroku

Heroku requires multi-factor authentication and accepts standard TOTP codes. This guide covers a direct Heroku login; if your organization uses single sign-on, it must enforce MFA through its identity provider.

Add a verification method

  1. Open Account Settings in Heroku.
  2. Select Setup Multi-Factor Authentication, or Manage Multi-Factor Authentication if already enabled.
  3. Choose Add One Time Password Generator.

Add Heroku to Sign In

You can use Sign In, our authenticator app for codes on your iPhone.

  1. With the setup QR code on another screen, open Sign In and tap Add → Scan QR Code.
  2. Scan the code, review the account details, and tap Add Account.
  3. Enter the current code in Heroku and click Connect. Finish with Done; Heroku sends an email confirming the new method.

Heroku offers a setup key if scanning is not possible. In Sign In, choose Add → Enter Setup Key, set Service to Heroku and Account to your account name, paste the secret into Key, then tap Add Account. Keep this key private.

Add recovery codes

Return to the MFA settings and choose Add Recovery Codes. Save the ten single-use codes securely outside your phone. You can generate a replacement set later.

If you cannot use your usual method, select an available alternative on the verification screen and use a recovery code. Prepare this before losing access.

Other verification options

Heroku also supports compatible security keys and built-in device verification such as Touch ID or Windows Hello. SMS is no longer a supported fallback. For the Heroku CLI, use its browser-based login flow; interactive password login does not support MFA.

If a code does not work

Make sure the Heroku entry in Sign In matches the account you are using. Wait for a fresh code, then enter it before it changes. If fresh codes keep failing, check that your iPhone uses automatic date and time.

Keep a working sign-in session and your recovery information available while resolving the problem. Adding an entry to Sign In does not finish enrollment: the service must accept a code and confirm activation.

Official help