Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequently logs me out #19

Open
kapso opened this issue Sep 6, 2018 · 6 comments
Open

Frequently logs me out #19

kapso opened this issue Sep 6, 2018 · 6 comments

Comments

@kapso
Copy link

kapso commented Sep 6, 2018

Is it just me, or everyone else gets frequently logged out as well. Basically I have to login to an account after every few days.

@alistairholt
Copy link

Used to work fine but now I have to re-authorize every time I switch accounts 😞 .

@sobrinho
Copy link

Any news on that?

@SmartManoj
Copy link

SmartManoj commented Sep 12, 2021

Workaround
temp.py

account_name=
account_name2=
mail=
pwd=

cmd=[

f'heroku accounts:set {account_name2}',
f'heroku accounts:remove {account_name}',
f'heroku accounts:add {account_name}',
]
import subprocess
for cmd in cmds:subprocess.run(cmd)

@kvenn
Copy link

kvenn commented Mar 12, 2024

Is this still affecting anyone else? Every time I switch it logs me out.

I can't tell if I'm using this wrong, but I'm assuming so since it would defeat the purpose if I have to heroku login each time.

@dentarg
Copy link

dentarg commented Mar 12, 2024

I'm using this plugin to switch between accounts and it is still working well, but I've learned that I need to curate the API key for my accounts manually, not use the Heroku CLI to sign in

If you prepare the config directory, heroku accounts:set <account> should work well.

See this article for more info about the different types of API keys Heroku have and how to create them manually: https://help.heroku.com/PBGP6IDE/how-should-i-generate-an-api-key-that-allows-me-to-use-the-heroku-platform-api

@kvenn
Copy link

kvenn commented Mar 12, 2024

Thank you @dentarg !! That fixed it. For anyone finding this issue in the future:

  1. Get your API Key for each account
  2. Navigate to where the auth config file is stored
    • cd ~/.config/heroku/accounts (if not there, it'll be cd ~/.heroku/accounts)
  3. Edit the specific account file and set the password to be your API Key for each account
    • open <account name> (account name from heroku accounts)
  4. You're done!

Bonus

Have it auto switch based on directory

#27 (comment)

⚠️ Note

Read this to understand how the API Key works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants