-
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
Validation code for forgotten password before sending new one #4876
Comments
. |
Have you tried using Cognito Triggers? Specifically the |
@mlabieniec I am not sure I understand how this allow us to validate the code the user is giving us. |
I agree with @Ownmarc, i tried several triggers, i was unable to custom verify the code or get access to the code itself. This would be a very nice feature indeed.
|
facing the same problem, is there any update on this issue? |
any updates? |
As an hack solution it's possible to do something like. const tempPassword = generateTempPassword()
await Auth.forgotPasswordSubmit(username, code, tempPassword)
// save temp password or pass to next screen // on next screen / step just get saved temp password and ask user to add new one
await Auth.changePassword(username, tempPassword, newPassword) |
This method doesn't work anymore since Would really love to get an official support from the AWS team on this issue. It's such a frustrating UX to enter the password two times only to find out the code had expired. |
any update? |
In our case we have some rules defined for the password (numbers, special chars, uppercase and lowercase letters) and I was able to achieve this by intentionally setting a failing password.
|
Summary
Would it be possible to validate the code of the forgotten password before having to send the new password ? Maybe its on Cognito's end ?
Motivation
I didn't find anyway of doing that with amplify. I would like to not show the new password fields if I can't validate the user's code for the forgotten password.
Actually there is 2 functions used in the request new password flow :
Basic Example
Being able to make a "forgotten password" flow in 3 steps :
Drawbacks
No, should have its own function along with forgotPasswordSubmit() and forgotPassword()
Related Issues
Here is all I found that is related :
amazon-archives/amazon-cognito-identity-js#466
References
None
The text was updated successfully, but these errors were encountered: