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

Improvements to auth login command #1370

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Apr 16, 2024

Changes

This PR makes a couple of improvements to the "auth login" command:

  1. Error if prompts for profile, host or account-id are required from a non-tty environment.
  2. Fix bug in host resolution in the setHost function. Before host in profile would be preferred over the host specified as a positional arg. This PR fixes the bug for both auth login and auth token commands.
  3. Add validation that the host starts with https. This validation is interactive.

Tests

Manually and unit tests.


Validation of host:

Screen.Recording.2024-04-16.at.6.51.46.PM.mov

@shreyas-goenka shreyas-goenka changed the title Improvements to auth login command Improvements to auth login command Apr 16, 2024
cmd/auth/login.go Outdated Show resolved Hide resolved
cmd/auth/auth.go Outdated Show resolved Hide resolved
cmd/auth/auth.go Outdated Show resolved Hide resolved
cmd/auth/auth.go Show resolved Hide resolved
cmd/auth/login.go Outdated Show resolved Hide resolved
cmd/auth/login.go Outdated Show resolved Hide resolved
cmd/auth/login.go Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

None yet

3 participants