-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PasswortReset when Email not verified and Confirmation status unconfirmed #13610
Comments
Hello, @johannespn and thank you for opening this issue. Can you double check in the Cognito console that this user's email is unconfirmed? We'd expect that a user with no confirmed email or phone number would throw an |
Thank you for the quick answer @cwomack, I double checked that the users email is unconfirmed: see screenshot. I am not getting the exception, but the behavior I described above. Also, I checked your codebase and the method I am calling (
So maybe it's missing the validation check for the confirmation status? |
@johannespn, was this user created via either the AWS CLI or manually in the Cognito console? |
@cwomack We create users via the JavaScript SDK which uses AWS CLI in the background, I believe |
@cwomack any updates on this? Our customers are complaining that they cannot reset their password |
Hey @johannespn 👋 how are users created with the SDK? Do the end users receive an invitation mail they use to log in for the first time? To reset the password for an unconfirmed user that has not verified their email, you will need to use the |
@josefaidt @cwomack I'm facing this issue as well and I believe it's similar to this issue: #11270 I recently upgraded to V6 and now I can't handle this error from the frontend side because the hub doesn't send events for errors anymore. I have no way of finding out if the user who is attempting to reset their password has an unconfirmed email. |
For those who come across the issue till it's fixed: To handle this in V6, I created a lambda that returns the following information:
I call this lambda inside the |
@johannespn, appreciate your patience on responses here. After @josefaidt's comment above and the related issue that @ysabri opened, can you let us know if you think this issue is fundamentally different than #11270? This appears to be the same Cognito limitation reported there. |
@ysabri, appreciate you linking these two! As for your comment about the hub events, what you mentioned is indeed tied to the changes in the Hub events that are emitted in Auth channel within v6, where there are fewer (v5 examples vs v6 examples). |
As you mentioned, this isn't the case in V6. I was hoping that at least the |
@cwomack Yes, seems like the same issue! A user signs up / is being signed up and does not verify their email. Then, they cannot use password reset flow. |
@johannespn, thank you for the confirmation. To consolidate the areas where we are tracking this and providing updates, we'll close this as a duplicate of #11270 since they stem from the same root cause. Please follow that issue for progress and updates, and thank you for taking the time to create this one! |
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
Calling
resetPassword({ username: values.email })
fromimport { resetPassword } from 'aws-amplify/auth'
when user
Email verified = No
andConfirmation status = Unconfirmed
results inbut no email with code is being sent.
Expected behavior
I would expect this method to throw an error in the case that user
Email verified = No
andConfirmation status = Unconfirmed
Reproduction steps
see description
Code Snippet
No response
Log output
No response
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
The text was updated successfully, but these errors were encountered: