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

swa login -cc is not working #589

Closed
1 of 2 tasks
doggy8088 opened this issue Oct 18, 2022 · 6 comments
Closed
1 of 2 tasks

swa login -cc is not working #589

doggy8088 opened this issue Oct 18, 2022 · 6 comments
Assignees
Labels
command: login All issues related to the login command good first issue Good for newcomers status: work in progress Someone is working on this issue or PR.

Comments

@doggy8088
Copy link

doggy8088 commented Oct 18, 2022

Before filing this issue, please ensure you're using the latest CLI by running swa --version and comparing to the latest version on npm.

Are you accessing the CLI from the default port :4280 ?

  • No, I am using a different port number (--port) and accessing the CLI from that port
  • Yes, I am accessing the CLI from port :4280

Make sure you are accessing the URL printed in the console when running swa start!

ℹ️ NOTE: Make sure to enable debug logs when running any swa commands using --verbose=silly

Describe the bug
A clear and concise description of what the bug is.

After I logined into Azure using swa login. I can use swa login --clear-credentials to login again. But when I use swa login -cc command, it's not working.

image

To Reproduce
Steps to reproduce the behavior:

  1. swa login
  2. swa login -cc

Expected behavior
A clear and concise description of what you expected to happen.

I expected swa login -cc should open browser for sign-in process.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 10.0.19043.2130

Additional context
Add any other context about the problem here.

@doggy8088 doggy8088 changed the title swa login -cc is not working swa login -cc is not working Oct 18, 2022
@doggy8088
Copy link
Author

I think you might able to implement swa logout for this. Sometimes I just want to logout to clear Azure credential cache.

@doggy8088
Copy link
Author

Here is the way to clear all credentials created by swa-cli:

PowerShell

cmdkey.exe /list | findstr swa-cli | ForEach-Object {
  cmdkey /delete:$($_.Split(' ')[5])
}

@sgollapudi77 sgollapudi77 added status: investigating The team is investigating the issues good first issue Good for newcomers command: login All issues related to the login command labels Oct 27, 2022
@rupareddy5-21
Copy link
Contributor

Hi @doggy8088, thanks for pointing this out, we have found the root cause and created a PR for the fix. The flag -cc is not working because -c is a global option for swa-cli.config.json path and that is taking priority when -cc flag is used. For fixing this, we have changed the short-form of flag from -cc to -CC. Sorry for the inconvenience caused.

@doggy8088
Copy link
Author

@rupareddy5-21 Are you consider to have a swa logout subcommand?

@Reshmi-Sriram
Copy link
Contributor

@rupareddy5-21 Are you consider to have a swa logout subcommand?

Hi @doggy8088, this is a great suggestion. Currently the team is working towards supporting the clear credentials flag. Could you help us understand better on whether you would still be looking for a swa logout option? We can definitely pick it up if the current support for clear-credentials is not enough. Thanks!

@rupareddy5-21 rupareddy5-21 added status: work in progress Someone is working on this issue or PR. and removed status: investigating The team is investigating the issues labels Dec 6, 2022
@doggy8088
Copy link
Author

doggy8088 commented Jan 8, 2024

@Reshmi-Sriram I tried latest version today. (1.1.6)

I still think the swa logout still required. Right now, the -CC or --clear-credentials option is to clear persisted credentials before login. It still a login process. It's not intuitive for clear credential. The use case could be someone login at other's or public computer. After been deployed, I simply want a "LOGOUT" to clear credential. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command: login All issues related to the login command good first issue Good for newcomers status: work in progress Someone is working on this issue or PR.
Projects
None yet
Development

No branches or pull requests

4 participants