Auth.forgotPassword does not work when user account status is "FORCE_CHANGE_PASSWORD"
See original GitHub issueThis might be a duplicate of 1182.
When a user is created through the JS/Node SDK using AdminCreateUser, they get an email with a temporary password. We have a common issue where a user does not log in before their temporary password expires or the user cannot find the email.
When a new user is created their “Account Status” is 'FORCE_CHANGE_PASSWORD'
and we are setting email_verified
to true
.
It appears there is no way to reset the password using Amplify.Auth.forgotPassword
. Unfortunately this puts us in a position where we have to resend the email through the CLI or manually reset the password in the AWS Console.
Ideally a user would be able to reset their password if their email is verified.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Amazon Cognito didn't send the forgot password verification ...
If the user status is FORCE_CHANGE_PASSWORD, then the ForgotPassword API call can't be used and the verification code isn't sent. Check how the ......
Read more >Restore password for FORCE_CHANGE_PASSWORD status
NotAuthorizedException: User password cannot be reset in the current state. Is there any way to reset password in such state? AWS Collective.
Read more >Authentication - Password & user management - JavaScript
The user is asked to provide the new password and required attributes during the first sign-in attempt if a valid user directory is...
Read more >How to use the @aws-amplify/auth.forgotPassword function in ...
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >Signing up and confirming user accounts - Amazon Cognito
If you choose this option, Amazon Cognito doesn't send verification codes when users sign up. Choose this option if you are using a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alspdx according to cognito docs.
Currently there is no option for the library to do this. Is a server side problem that could implemented using a lambda function.
I will close this issue because a duplicate from #1182
We have an open RFC for auth enhancements here feel free to add this request or comments.
Thanks for your feedback!
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.