Closed codedplanetuk closed 6 years ago
@codedplanetuk I don't think the Cognito Identity Id changes when you reset your password. We have this running in production with the password reset functionality. Are you sure that's what you are seeing?
Apologies my bad. A ran another test and the cognitoIdentityId did not change. I think I must have deleted the entire user from the user table which caused the issue. Will close this thread. Thanks.
Using the cognitoIdentityId as the userId key in the table can cause an issue, as the cognitoIdentityId can change.
If you go on to implement forgot password functionality, you will find that the cognitoIdentityId will change during a password reset. This means any notes you had with the old cognitoIdentityId will not be retrieved for the user who has changed password.
I'm thinking to store the cognito username as the userId key instead, as this seems to persist even if you do a password reset.
Has anyone else run into this issue? Any suggestions?