Skip to content

Conversation

daniel-de-vera
Copy link
Contributor

Depends on signadot/go-sdk#63.

This PR implements signadot auth login and signadot auth logout commands.
E.g:

$ signadot auth login
To authenticate, visit: https://auth.staging.signadot.com/activate?user_code=JWKT-PCRM

✓ Waiting for authentication: 
✓ Successfully logged in


$ signadot sandbox list
NAME                DESCRIPTION   CLUSTER   CREATED         STATUS
daniel-tests-demo                 test      one month ago   Not Ready


$ signadot auth logout
✓ Successfully logged out


$ signadot sandbox list
Error: No authentication found. Please either specify an API key through SIGNADOT_API_KEY env var/api_key field in ~/.signadot/config.yaml, or log in using 'auth login'

Copy link
Member

@scott-cotton scott-cotton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions:

  1. The message To authenticate, visit: https://auth.staging.signadot.com/activate?user_code=WXMK-ZDNB

would IMO be less confusing if it read

To authenticate, visit: https://auth.staging.signadot.com/activate?user_code=WXMK-ZDNB 
and confirm the code:  WXMK-ZDNB

since the page you direct to says "please confirm the code"

  1. I think the message
Error: No authentication found. Please either specify an API key through SIGNADOT_API_KEY env var/api_key field in ~/.signadot/config.yaml, or log in using 'auth login'

is too long for 1 line and that auth login should be the first option

@daniel-de-vera
Copy link
Contributor Author

Some suggestions:

  1. The message To authenticate, visit: https://auth.staging.signadot.com/activate?user_code=WXMK-ZDNB

would IMO be less confusing if it read

To authenticate, visit: https://auth.staging.signadot.com/activate?user_code=WXMK-ZDNB 
and confirm the code:  WXMK-ZDNB

since the page you direct to says "please confirm the code"

This is done in e04feb0.

  1. I think the message
Error: No authentication found. Please either specify an API key through SIGNADOT_API_KEY env var/api_key field in ~/.signadot/config.yaml, or log in using 'auth login'

is too long for 1 line and that auth login should be the first option

I changed the order, now it reads like:

Error: No authentication found. Please either log in using 'auth login' or specify an API key through SIGNADOT_API_KEY env var/api_key field in ~/.signadot/config.yaml

Not sure, how to make it shorter (and we have a similar error when the org is undefined). I will let you and @foxish define this.

@scott-cotton
Copy link
Member

changed the auth error messages in b676c7f:

25-04-30 scott@air cli % ./signadot sb list
Error: No organisation found. Please either log in using 'auth login',
or specify $SIGNADOT_ORG, or specify the org field in ~/.signadot/config.yaml
25-04-30 scott@air cli % ./signadot sb list
Error: No authentication found. Please either log in using 'auth login',
or specify an API key through $SIGNADOT_API_KEY or the api_key field
in ~/.signadot/config.yaml
25-04-30 scott@air cli %

Copy link
Member

@scott-cotton scott-cotton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daniel-de-vera daniel-de-vera merged commit 71af8f5 into main Apr 30, 2025
@daniel-de-vera daniel-de-vera deleted the add-auth branch April 30, 2025 19:31
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.

3 participants