Skip to content

Cannot update attributes of unverified user when signup attributes are incorrect #12246

Open
@james-cohen

Description

@james-cohen

Before opening, please confirm:

JavaScript Framework

Not applicable

Amplify APIs

Authentication

Amplify Categories

auth

Environment information

# Put output below this line


Describe the bug

My user pool is configured to allow a username signup with email and/or phone number. If I sign up as a new user e.g.

await Auth.signUp({ username: 'testuser123', password: '***', attributes: { email: '[email protected]' } })

An authentication code is sent. However, if I accidentally entered the wrong email, there is no way to update it. If I try and sign up with the same user details again, I get a UsernameExistsException.

If I try and update the user attributes, this requires an authenticated user as a parameter, which isn't possible because the user is unconfirmed - if I call Auth.signIn() I get a UserNotConfirmedException

So now that username is stuck in limbo forever because it can't be confirmed as the email address doesn't exist, but the email can't be updated.

Expected behavior

Calling sign up with the same username and password on an unconfirmed user should be treated as a new sign up and allow the user to be recreated with the new attributes provided.

Reproduction steps

As above

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

Labels

AuthRelated to Auth components/categoryCognitoRelated to cognito issuesService TeamIssues asked to the Service Teamfeature-requestRequest a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions