Azure / Azure/static-web-apps-cli
swa-cli login Failed to setup project: Cannot delete credentials
- Dominant language
- TypeScript
- Stars
- 668
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
Before filing this issue, please ensure you're using the latest CLI by running `swa --version` and comparing to the latest version on [npm](https://www.npmjs.com/package/@azure/static-web-apps-cli).
```
# node --version
v22.14.0
# npm --version
10.9.2
# swa --version
2.0.3
```
**Are you accessing the CLI from the default port `:4280` ?**
- [ ] Yes
**Describe the bug**
after the login via az login the login via swa login with the option --clear-credentials fails.
**To Reproduce**
Steps to reproduce the behavior:
1. login via az li
2. execute swa login with --clear-credentials option
3. See error
**Expected behavior**
The client can connect to swa with different credentials.
**Screenshots**
```
# swa login --tenant xxx --client-id xxx --client-secret xxx- -subscription-id xxx --resource-group rg-test-we --app-name swa-test-we --clear-credentials --verbose=silly
Welcome to Azure Static Web Apps CLI (2.0.3)
Getting config file options from "swa-cli.config.json"...
Config file does not exist at "swa-cli.config.json"
Checking Azure session...
Executing authenticateWithAzureIdentity
- details:
- tenantId: xxx
- clientId: xxx
- clientSecret: xxx
- useKeychain: true
Keychain is enabled
Executing swaCliPersistencePlugin
Clearing keychain credentials
Clearing credentials cache
Machine ID:
Invoking crypto service
deleting credentials from keychain
- fullKey: xxx
Deleting credentials from native keychain
Getting keychain reference
isKeychainEnabled: true
KeychainCache: undefined
Attempting to load native keychain
✖ Failed to setup project: Cannot delete credentials
✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
https://github.com/Azure/static-web-apps-cli/issues/new/choose
```
**Desktop (please complete the following information):**
- OS: RHEL
- Version 9.5
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.