heroku-accounts
heroku-accounts copied to clipboard
2FA not working
$ heroku accounts:add personal
Enter your Heroku credentials:
Email: [redacted]
Password: [redacted]
▸ 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.
Any updates on this? Having the same issue
Having this issue too. I'm getting a slightly different message though:
% heroku accounts:add personal
Enter your Heroku credentials:
Email: [redacted]
Password: [redacted]
▸ Your account has MFA enabled; API requests using basic authentication with email and password are not
▸ supported. Please generate an authorization token for API access.
Same error message here
As a workaround, I did this to manually create an account (using Ubuntu):
$ mkdir -p ~/.heroku/accounts
$ echo "username: [email protected]\npassword: " > ~/.heroku/accounts/YOUR_ACCOUNT
Now when you try to execute a command with this account, Heroku recognizes the creds are bad and sends you to the browser login to get a token instead of asking for your password:
$ heroku accounts:set YOUR_ACCOUNT
$ heroku create
Creating app... !
▸ Invalid credentials provided.
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to [redacted]
Logging in... done
Logged in as [email protected]
Creating app... done,
This workaround doesn't allow you to switch easily. You have to sign in again each time.
I'm going to fork this project and submit a PR to support getting and setting the api token properly through the web auth flow.
https://github.com/heroku/heroku-accounts/issues/35#issuecomment-820019138
Note that an API key can be used as password as well.
Source: https://stackoverflow.com/questions/68105084/not-able-login-to-heroku-account-from-command-line
https://github.com/heroku/heroku-accounts/pull/38
@rubengmurray doesn't work for actual personal accounts with 2FA.
Really? I did the following:
- heroku accounts:add my_name
- prompted for email
- prompted for password (used API key)
Worked.
I'm just using a standard personal login, go to top right, account settings, then bottom of the screen, API key...
Using API key as password worked for me as well 😄 Thanks @holtkamp
Needs instructions in the README for how to do this. I don't really follow the discussion in this thread.
Seeing as how heroku now requires MFA, and this tool does not work as documented with an account with MFA... I'm getting the feeling heroku doesn't actually support this tool anymore? (I'm getting the feeling it's unclear what heroku does support anymore?)
@jrochkind - the fact I raised this in Dec last year and it's had 0 comments would support that theory, though I'm still using this fine with multiple accounts locally.
Is the generating of an API key to use as a substitute for your password the element that is unclear?
The state of this repository is so bad that even it's from heorku, I feel insecure (Pun intended)
@jrochkind I wrote a few words at https://github.com/heroku/heroku-accounts/issues/19#issuecomment-1991785520 how I use this plugin