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

Providing a malformed endpoint URL to spacectl profile login causes it to open to an unexpected URL #157

Closed
nint8835 opened this issue Jun 26, 2023 · 0 comments · Fixed by #164
Labels
bug Something isn't working

Comments

@nint8835
Copy link

Made a typo while logging into Spacelift, and noticed some strange behaviour that took me a bit to figure out what's going on.
If a user enters a malformed URL at the prompt for the Spacelift endpoint on spacectl profile login <name>, the setup process will still continue as normal, but it'll open the browser to a similarly malformed URL.

Steps to reproduce

  • Run spacectl profile login example
  • Enter https:/example.app.spacelift.io/(note the single slash after https:, rather than a double slash)
  • Select "login with a web browser" as the authentication flow

Expected result

spacectl detects the URL as being malformed / not following the expected format, and displays some form of an error

Actual result

Browser is opened to https:/cli_login?key=..., which will fail to load due to a DNS error, and no feedback is provided to the user

@tomasmik tomasmik added the bug Something isn't working label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants