amplify-backend
amplify-backend copied to clipboard
remove username from username_attributes in outputs schema
Problem
in Cognito, username attributes are attributes that can be used in place of a username https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPool.html#usernameattributes
Issue number, if available:
Changes
removes username from list of valid username_attributes in the outputs schema
Corresponding docs PR, if applicable:
Validation
Checklist
- [ ] If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
- [ ] If this PR requires a change to the Project Architecture README, I have included that update in this PR.
- [ ] If this PR requires a docs update, I have linked to that docs PR above.
- [ ] If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the
run-e2elabel set.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
🦋 Changeset detected
Latest commit: 7a91959b88a894e4ef5b39285d3c0379170583b4
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 13 packages
| Name | Type |
|---|---|
| @aws-amplify/client-config | Major |
| @aws-amplify/platform-core | Major |
| @aws-amplify/backend | Patch |
| @aws-amplify/backend-cli | Patch |
| @aws-amplify/sandbox | Patch |
| @aws-amplify/backend-deployer | Patch |
| @aws-amplify/backend-output-storage | Patch |
| @aws-amplify/backend-secret | Patch |
| @aws-amplify/cli-core | Patch |
| create-amplify | Patch |
| @aws-amplify/deployed-backend-client | Patch |
| @aws-amplify/model-generator | Patch |
| @aws-amplify/schema-generator | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@edwardfoyle that command just loops for me :/ I have to kill my terminal to stop it
I put this as a patch because I don't think it's being used, but I may have overlooked something (cc @Amplifiyer )
need to update api extract (run
npm run update:api). Also, isn't this a breaking change?
This is a breaking change. username should be deprecated, not removed. And recorded for removal next time we ship MV.
This is ugly, but leaving it as is won't hurt since we control the producer.
@josefaidt
that command just loops for me :/ I have to kill my terminal to stop it
I think you need to build locally first npm run build && npm run update:api
I'll move forward with the change to a major bump in the changeset. Though this value does not get generated:
https://github.com/aws-amplify/amplify-backend/blob/main/packages/auth-construct/src/construct.ts#L952
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnUserPool.html#usernameattributes
It is expected to be consumed https://github.com/aws-amplify/amplify-js/blob/44696fb49130f3de213a2c53291f8afe3b53bb27/packages/core/src/parseAmplifyOutputs.ts#L144