aws-amplify / aws-amplify/amplify-cli
Removal of identity pool in auth update flow does not remove related keys from platform-specific config files.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
v12.19.0
### Amplify CLI Version
4.44.2
### What operating system are you using?
macOS
### Amplify Categories
auth
### Amplify Commands
update
### Describe the bug
When running `amplify auth update` and updating from a "User Pool + Identity Pool" configuration to "UserPool only", the identity pool is deleted but is still defined in the amplifyconfiguration (native) / aws-exports (js) file.
### Expected behavior
When an identity pool is removed from the auth configuration, the corresponding value should be removed from the configuration file on all platforms.
### Reproduction steps
1. Create an auth resource. For the prompt "Select the authentication/authorization services that you want to use:", select "User Sign-Up, Sign-In, connected with AWS IAM controls (Enables per-user Storage features for
images or other content, Analytics, and more)"
2. Run 'amplify push`.
3. Run 'amplify auth update`. Select the manual flow. For the prompt "Select the authentication/authorization services that you want to use:", select "User Sign-Up & Sign-In only (Best used with a cloud API only)"
4. Run `amplify push`.
5. Check the config file, and note that the identity pool is still defined.
### Log output
N/A
This causes difficult to diagnose [issues](https://github.com/aws-amplify/amplify-flutter/issues/409) when attempting to fetch sessions with the native libraries.
Contributor guide
Assessment
This issue has not been assessed yet.