user.completeNewPasswordChallenge is not a function
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Use flat aws-exports.js structure
- Set Cognito up such that Only Admin creates accounts
- Use Amplify but not mobile hub
- Create an account
- try to change the temporary password using
Auth.completeNewPassword(userFromLoginAttempt, newPassword, requiredAttributes)
- Responds with
user.completeNewPasswordChallenge is not a function
Expected behavior Password is changed and the user can login
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Version: 1.0.0
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.
Issue Analytics
- State:
- Created 5 years ago
- Comments:22 (2 by maintainers)
Top Results From Across the Web
AWS amplify auth.completeNewPassword() doesn' work
When I try to update the password. I get this error. TypeError: user.completeNewPasswordChallenge is not a function at Auth.js ...
Read more >CognitoUser.completeNewPasswordChallenge - Javascript
How to use. completeNewPasswordChallenge. function. in. CognitoUser · Best JavaScript code snippets using amazon-cognito-identity-js.CognitoUser.
Read more >[Solved]-AWS Cognito completeNewPasswordChallenge calls ...
Coding example for the question AWS Cognito completeNewPasswordChallenge calls onFailure method but the user is confirmed in AWS Console-Reactjs.
Read more >RespondToAuthChallenge - Amazon Cognito User Pools
You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito invokes ......
Read more >Reactjs – AWS Cognito completeNewPasswordChallenge ...
I have a user that was created in the AWS Console by an admin, ... and when I call the completeNewPasswordChallenge function with...
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
You can simply use the predefined amplify method like below.
const currentUser = await Auth.currentAuthenticatedUser();
@goatandsheep When you get resolved from
Auth.signIn()
with that user object, you are not actually signed in because you need to complete the new password. So at that momentAuth.currentSession
andAuth.currentAuthenticatedUser
won’t work because you are not signed in. You need to directly use that user object returned fromAuth.signIn()
to help you finish the login process.