amplify-js
amplify-js copied to clipboard
Unconfirmed email in cognito user-pool
Before opening, please confirm:
- [X] I have searched for duplicate or closed issues and discussions.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Categories
No response
Environment information
lambda js
Describe the bug
I'm filtering email in pre-signup lambda function those emails are in cognito user-pool can't be used again for sign up, but there is a situation if user leaves an email unconfirmed and latter user uses that mail for signup then pre-signup function will not allow because there is already an entry with same email(but unconfirmed). Tell me should I filter email in lambda or remove the lambda and allow duplicate entries?
Expected behavior
I want when user enters the same unconfirmed email , it should say email already exist send code for verification.
Reproduction steps
- Used forcealiasauth
- required attribute email only
- User can sign in through email & preferred username
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
Hi @AsitDixit 👋
I'm taking a look at this issue but first off, i'd like to confirm the following:
- Are your Cognito user pool sign-in options set to User name or email?
- If set to User name, is the pre-sign up lambda trigger checking for the email in attributes of the existing users?
Also note that to send a code that confirms an existing user, you would implement Auth.resendSignUp(username)
to send a code to the user, then confirm by using the code that was sent to the user with Auth.confirmSignUp(username, code)
.
Hi @AsitDixit, following up on this - let me know if your still facing this issue
Solved
@AsitDixit glad you were able to get this resolved. Any information on what the fix was?