Skip to content

Improving the enterprise login experience #539

Closed

Description

@zeke

👋

I manage apps under my personal account as well as an enterprise account, so I often switch from one to the other, i.e. heroku logout && heroku login --sso

It would be nice if the CLI would:

  • remember my org so I don't have to type it
  • not make me type --sso
  • not make me copy and paste a token from browser to terminal
  • not expire my enterprise session so quickly
  • allow me to switch between profiles easily, à la ghub.io/npmrc

I know some of these are probably difficult, but any one of them would help reduce friction.

Activity

  1. jdx commented on Jul 9, 2017

    @jdx
    Contributor

    great suggestions! I've considered in the past storing the fact that sso was used in the netrc file so it's known that we should use that method the next time there is a login, but it's a little tricky how to do that since heroku logout essentially wipes that information. Is there a reason why you have to run heroku logout first that you're aware of? Or can you just run heroku login --sso? If the latter is true (and I think it is) then that flag is pretty easy to add to make it default to sso.

    May need to add a --no-sso to unset it though.

    For switching profiles, use the heroku-accounts plugin: https://github.com/heroku/heroku-accounts

    For org remembering, I feel the best way to do that would be to set the HEROKU_ORGANIZATION environment variable which would work today. Perhaps we could set some global state for the last used org, but I worry that may surprise people.

    I'll have to take a look at session expiration. It's possible it may be set to a current time for compliance reasons of some sort, but we may be able to make that configurable.

  2. zeke commented on Jul 9, 2017

    @zeke
    Author

    Awesome stuff, thanks.

    Is there a reason why you have to run heroku logout first that you're aware of?

    No. It was just an assumption on my part.

    For switching profiles, use the heroku-accounts plugin: heroku/heroku-accounts

    👍

    set the HEROKU_ORGANIZATION environment variable

    👍

    Thanks! Good enough for me. Feel free to close this. :)

  3. jdx commented on Jul 9, 2017

    @jdx
    Contributor

    I'd like to keep it open until we add the netrc remembering, I think that's useful functionality

  4. zeke commented on Nov 30, 2017

    @zeke
    Author

    Friendly bump.

    Enterprise session length is still very short, and I have to log in quite often.

  5. jdx commented on Dec 1, 2017

    @jdx
    Contributor

    @zeke would you mind sending a support ticket regarding the session length? that's out of @heroku/cli's hands and we're the only ones that look at github

  6. zeke commented on Dec 2, 2017

    @zeke
    Author

    Done. 🤞

  7. kwlockwo commented on Mar 15, 2018

    @kwlockwo

    @zeke the timeout for SSO is 8 hours. Not sure if you ever opened that support ticket, but certainly do so if you are constantly being logged out in less than that time.

    @jdxcode one comment I have seen is that when SSO does expire the default login flow is not for SSO. So customers need to cancel that login, and rerun heroku login --sso it would be nice if it defaulted to flow used in the previous session.

  8. zeke commented on Mar 16, 2018

    @zeke
    Author

    Not sure if you ever opened that support ticket

    Here's the ticket I opened in December 2017: https://help.heroku.com/tickets/534061

    The last Heroku response was:

    I've asked the API team to look into this.

    ... but never heard anything beyond that, and the ticket is now closed.

  9. jdx commented on Mar 16, 2018

    @jdx
    Contributor

    we should make the CLI remember the setting, but I feel even then an 8 hour timeout makes this experience subpar

  10. zeke commented on Mar 16, 2018

    @zeke
    Author

    Agreed.

  11. zeke commented on Apr 18, 2018

    @zeke
    Author

    A thought: I no longer use the HEROKU_ORGANIZATION environment variable because it messes up non-SSO logins. So that means I'm back to typing in the org name whenever I run heroku login --sso. It would be nice to have an --org option.

  12. jdx commented on May 7, 2018

    @jdx
    Contributor

    @zeke I appreciate your patience. We're finally working on this and I've made a few improvements. It should now default to sso if it used sso last and it should fill in the org into that field. I'm hoping to also make the copy+paste not necessary either by moving to a web-based login but this is going to take a bit more time (if it's feasible that is)

  13. zeke commented on May 7, 2018

    @zeke
    Author

    Thanks!

    it should fill in the org into that field

    Can you clarify what you mean by this? Are you saying the CLI accepts a new argument?

  14. jdx commented on May 7, 2018

    @jdx
    Contributor

    No, the prompt for Organization: will now default to the last used organization so you don't need to set HEROKU_ORGANIZATION anymore

  15. zeke commented on May 8, 2018

    @zeke
    Author

    Nice. Just gave it a try but hit a few snags: #836

  16. jdx commented on Oct 16, 2018

    @jdx
    Contributor

    Hey everyone, we just finished a new browser based login which should improve this even more (no more copy+paste)

    Try it out with heroku update beta && heroku login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions