Skip to main content

Avoid requirement to redirect to localhost for spacectl profile login

I would like it if the spacectl profile login authentication using the browser didn’t rely on redirecting to localhost. I’m pretty sure this should be possible, because the aws cli can do it.

I think one way it could be done is something like:

  1. spacectl makes a request to spacelift to initiate a login flow, and the spacelift server responds with a randomly generated token

  2. spacectl gives the user a link, and possibly a confirmation token

  3. spacectl listens, possibly with a web socket, or polling an endoint, using for confirmation using the token from 1

  4. Once the user has authenticated in the browser, the server sends the final auth token to spacectl via the websocket or polled endpoint.

This is needed when the device/host that you are running spacectl on isn’t necessarily the same as the device/host that you can log in on a browser with.

Workaround
Problem

Log in to comment and vote

No comments yet

Be the first to share your thoughts.