Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The cognitoIdentityId used for the userId key in the DB table can change #13

Closed
codedplanetuk opened this issue Apr 19, 2018 · 2 comments

Comments

@codedplanetuk
Copy link

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?

@jayair
Copy link
Member

jayair commented Apr 20, 2018

@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?

@codedplanetuk
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants