cloudfoundry / cloudfoundry/cli

Improve UX for `cf login -sso`

Open
#1,617 12 comments 5 reactions 1 assignee View on GitHub

@a-b is already working on this.

Since Oct 3, 2024.

enhancement unscheduled
Dominant language
Go
Stars
1.9k
Forks
990
Avg merge
1d 7h
Merged PRs (30d)
8

Description

I've been in touch with you guys a while ago on Slack about this feature request. I'd like to contribute a bit of code. It seemed at least some of you liked my idea. I was asked to open a Github issue, so here I am.

What's the user value of this feature request?
Currently authenticating with cf login -sso requires you to:

  • manually open a browser
  • copy paste UAA url from the cf cli to the browser.
  • After authenticating in UAA, copy the shown 'temporary authorization code' from the browser.
  • Paste the 'temporary authorization code' on the stdin of cf cli

I'd like to change this into a user experience similar to the fly cli of concourse:

  • Browser is opened automatically with the right URL
  • Authenticate in UAA
  • CF cli picks up the authorization code automatically, so it means you're done.

Who is the functionality for?
User who authenticate to CF using Single Sign On

How often will this functionality be used by the user?
Every time an user needs to re-authenticate

Who else is affected by the change?
No. Just like with the fly cli, pasting the 'temporary authentication code' on stdin will also still work.

Is your feature request related to a problem? Please describe.
Not a problem. Just trying to improve the user experience. Our users find the Single Sign On cumbersome with the copy-pasting currently.

Describe the solution you'd like
See the above value proposition

Describe alternatives you've considered
I don't think there are any?

Additional context
I was thinking to change the cf/commands/login.go
Here is the work in progress: https://github.com/SpringerPE/cli/blob/master/cf/commands/login.go

I'm expecting I'll need a change in UAA for this to work, as UAA needs to do a redirect to localhost with the temporary authorization code as query string parameter. Similar to how the oauth redirects work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.