amazon web services - AWS cognito forgot password flow -


i've created aws cognito user pool email required attribute , checked email verification. users created java spring backend service using awscognitoclient sdk , calling admincreateuser(createuser) method. user gets email temporary password, on signing in first time set new password. when execute forgot password flow, following error,

 invalidparameterexception: cannot reset password user there no registered/verified email or phone_number 

although have received temporary password email id signed , changed password first time above error. can explain missing?

below javascript code executing forgot password flow,

forgotpassword(username: string, poolinfo:any){         var pooldata = {             userpoolid : poolinfo.poolid, // user pool id here             clientid : poolinfo.portalclientid // client id here         };          var userpool = new awscognito.cognitoidentityserviceprovider.cognitouserpool(pooldata);          var userdata = {             username : username,             pool : userpool         };          var cognitouser = new awscognito.cognitoidentityserviceprovider.cognitouser(userdata);          cognitouser.forgotpassword({             onsuccess: function (result) {              this.router.navigate(['login']);              },             onfailure: function(err) {                 alert(err);             },             //optional automatic callback             inputverificationcode: function(data) {                 var verificationcode = prompt('please input verification code ' ,'');                 var newpassword = prompt('enter new password ' ,'');                 cognitouser.confirmpassword(verificationcode, newpassword, this);             }         });     } 

resolved. had add "email_verified":"true" attribute users created backend service.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -