更新时间:2023-12-02 20:51:40
经过艰苦的努力,我发现每次使用
After so much of struggle, I figured out that I was creating new Cognito user every time using
poolData = {
UserPoolId: "XXXXXXXXXXXXXXXXX",
ClientId: "XXXXXXXXXXXXXXXXXXXXXXXX"
};
userPool: CognitoUserPool = new CognitoUserPool(this.poolData);
因此,每当我这样称呼时,都会创建一个新的认知用户.因此,对此的更改密码无效.
So, whenever I call this, a new cognito-user is created. So, change-password on this was not working.
当我创建一个通用函数来访问 cognitoUser
并在各处使用该函数时,对我来说是可行的.
When I created a common function to access cognitoUser
and using the same everywhere worked for me.
谢谢...