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

Using oxide auth logout (without specifying the profile) should confirm default profile and/or check if that default still even exists #796

Open
1 of 4 tasks
twinfees opened this issue Aug 16, 2024 · 1 comment
Assignees

Comments

@twinfees
Copy link

twinfees commented Aug 16, 2024

Component

  • CLI
  • SDK
  • Something else
  • Not sure

What was the expected behaviour

If you have multiple profiles and run oxide auth logout without specifying the profile (i.e. oxide --profile oxide auth logout), the confirmation prompt should confirm your default profile and/or ask you which profile you want to remove, with a list of your existing profiles that are authenticated.

Additionally, if the default profile no longer exists, oxide auth logout should know about that. For example:

With only the one profile:

$ oxide auth status                                                                                                                                          
Profile "oxide2" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated

If I run the command without the --profile flag, it still tells me that its removed the auth for a profile that no longer exists:

$ oxide auth logout
Confirm authentication information deletion: yes
Removed authentication information for profile "oxide"

What is the current behaviour and what actions did you take to get there

With four profiles set (note that three are to the same silo - also filed as a possible bug):

$ oxide auth status 
Profile "oxide" (https://oxide.sys.blah2.blahblah.com) status: Authenticated
Profile "oxide2" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated
Profile "oxide3" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated
Profile "oxide4" (https://oxide.sys.blah3.blah-preview.com) status: Authenticated

If I forget to include the profile and just run oxide auth logout, I get the following:

$ oxide auth logout 
Confirm authentication information deletion: [y/n]

Confirming Yes removes the default profile as expected; but one might forget which profile is their default.

CLI or SDK version

0.6.2+20240710.0

Operating system

Sonoma 14.3

Anything else you would like to add?

No response

@twinfees twinfees changed the title Using oxide auth logout without specifying the profile removes your first profile Using oxide auth logout (without specifying the profile) should confirm default profile Aug 19, 2024
@twinfees twinfees changed the title Using oxide auth logout (without specifying the profile) should confirm default profile Using oxide auth logout (without specifying the profile) should confirm default profile check of that default still even exists Aug 19, 2024
@twinfees twinfees changed the title Using oxide auth logout (without specifying the profile) should confirm default profile check of that default still even exists Using oxide auth logout (without specifying the profile) should confirm default profile and/or check if that default still even exists Aug 19, 2024
@twinfees
Copy link
Author

Just realized the config.toml file exists, which contains the default profile info. I can set my default to anything, and it will tell me that it's removed the auth for that, i.e.:

$ oxide auth logout                                                                                                                              
Confirm authentication information deletion: yes
Removed authentication information for profile "fake-profile"

@ahl ahl self-assigned this Aug 28, 2024
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

No branches or pull requests

2 participants