With the migration to Salesforce Multi-Factor Authentication (MFA), the
-i option for
heroku login command is no longer supported. This option was used to login in the CLI without requiring a browser to complete authentication.
Once your account is enrolled into the Salesforce MFA, using the
-i option will show a message like:
Ã¢ÂÂº Error: Multi-Factor Authentication is required for your account. Please remove the Ã¢ÂÂº '--interactive' parameter and try again to login and complete MFA verification using a web Ã¢ÂÂº browser. Ã¢ÂÂº Ã¢ÂÂº Error ID: mfa_required
To login to the Heroku CLI when a browser is not available, you will need to generate an API key on a machine which does have access to a browser. The API key can then be used to create a
.netrc file or set a
HEROKU_API_KEY environment variable which the Heroku CLI can use to authenticate. More details in the Dev Center article, Heroku CLI Authentication.